(definition: DirectiveDef<unknown>)
| 45 | rawHostDirectives: HostDirectiveConfig[] | (() => HostDirectiveConfig[]), |
| 46 | ) { |
| 47 | const feature: DirectiveDefFeature = (definition: DirectiveDef<unknown>) => { |
| 48 | const isEager = Array.isArray(rawHostDirectives); |
| 49 | |
| 50 | if (definition.hostDirectives === null) { |
| 51 | definition.resolveHostDirectives = resolveHostDirectives; |
| 52 | definition.hostDirectives = isEager |
| 53 | ? rawHostDirectives.map(createHostDirectiveDef) |
| 54 | : [rawHostDirectives]; |
| 55 | } else if (isEager) { |
| 56 | definition.hostDirectives.unshift(...rawHostDirectives.map(createHostDirectiveDef)); |
| 57 | } else { |
| 58 | definition.hostDirectives.unshift(rawHostDirectives); |
| 59 | } |
| 60 | }; |
| 61 | feature.ngInherit = true; |
| 62 | return feature; |
| 63 | } |
no test coverage detected
searching dependent graphs…