(directiveDefinition: DirectiveDefinition<T>)
| 610 | } |
| 611 | |
| 612 | function getNgDirectiveDef<T>(directiveDefinition: DirectiveDefinition<T>): DirectiveDef<T> { |
| 613 | const declaredInputs: Record<string, string> = {}; |
| 614 | |
| 615 | return { |
| 616 | type: directiveDefinition.type, |
| 617 | providersResolver: null, |
| 618 | viewProvidersResolver: null, |
| 619 | factory: null, |
| 620 | hostBindings: directiveDefinition.hostBindings || null, |
| 621 | hostVars: directiveDefinition.hostVars || 0, |
| 622 | hostAttrs: directiveDefinition.hostAttrs || null, |
| 623 | contentQueries: directiveDefinition.contentQueries || null, |
| 624 | declaredInputs: declaredInputs, |
| 625 | inputConfig: directiveDefinition.inputs || EMPTY_OBJ, |
| 626 | exportAs: directiveDefinition.exportAs || null, |
| 627 | standalone: directiveDefinition.standalone ?? true, |
| 628 | selectors: directiveDefinition.selectors || EMPTY_ARRAY, |
| 629 | viewQuery: directiveDefinition.viewQuery || null, |
| 630 | features: directiveDefinition.features || null, |
| 631 | setInput: null, |
| 632 | resolveHostDirectives: null, |
| 633 | hostDirectives: null, |
| 634 | controlDef: null, |
| 635 | signalFormsInputPresence: null, |
| 636 | inputs: parseAndConvertInputsForDefinition(directiveDefinition.inputs, declaredInputs), |
| 637 | outputs: parseAndConvertOutputsForDefinition(directiveDefinition.outputs), |
| 638 | debugInfo: null, |
| 639 | }; |
| 640 | } |
| 641 | |
| 642 | function initFeatures<T>(definition: DirectiveDef<T> | ComponentDef<T>): void { |
| 643 | definition.features?.forEach((fn) => fn(definition)); |
no test coverage detected