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