(type: Type<unknown> | AbstractType<unknown>)
| 38 | |
| 39 | /** Verifies whether a given type is a component */ |
| 40 | export function assertComponentDef(type: Type<unknown> | AbstractType<unknown>) { |
| 41 | if (!getComponentDef(type)) { |
| 42 | throw new RuntimeError( |
| 43 | RuntimeErrorCode.MISSING_GENERATED_DEF, |
| 44 | `The ${stringifyForError(type)} is not an Angular component, ` + |
| 45 | `make sure it has the \`@Component\` decorator.`, |
| 46 | ); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | /** Called when there are multiple component selectors that match a given node */ |
| 51 | export function throwMultipleComponentError( |
no test coverage detected
searching dependent graphs…