* Checks that a directive declared in the module actually has a selector. * * This does the following: * 1. Reads the directive definition off the type. This also finds a definition that the type * inherited from a base class. * 2. Skips the check if the type is really a component
(type: Type<any>)
| 320 | * user to add one. |
| 321 | */ |
| 322 | function verifyDirectivesHaveSelector(type: Type<any>): void { |
| 323 | type = resolveForwardRef(type); |
| 324 | const def = getDirectiveDef(type); |
| 325 | if (!getComponentDef(type) && !getPipeDef(type) && def && def.selectors.length == 0) { |
| 326 | errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`); |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | function verifyNotStandalone(type: Type<any>, moduleType: NgModuleType): void { |
| 331 | type = resolveForwardRef(type); |
nothing calls this directly
no test coverage detected