MCPcopy Index your code
hub / github.com/angular/angular / assertComponentDef

Function assertComponentDef

packages/core/src/render3/errors.ts:40–48  ·  view source on GitHub ↗
(type: Type<unknown> | AbstractType<unknown>)

Source from the content-addressed store, hash-verified

38
39/** Verifies whether a given type is a component */
40export 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 */
51export function throwMultipleComponentError(

Callers 4

ɵɵreplaceMetadataFunction · 0.90
recreateMatchingLViewsFunction · 0.90
createComponentFunction · 0.90

Calls 2

getComponentDefFunction · 0.90
stringifyForErrorFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…