MCPcopy Create free account
hub / github.com/angular/angular / getComponentDef

Function getComponentDef

packages/core/testing/src/test_bed_compiler.ts:1159–1161  ·  view source on GitHub ↗
(value: Type<unknown>)

Source from the content-addressed store, hash-verified

1157function getComponentDef(value: ComponentType<unknown>): ComponentDef<unknown>;
1158function getComponentDef(value: Type<unknown>): ComponentDef<unknown> | null;
1159function getComponentDef(value: Type<unknown>): ComponentDef<unknown> | null {
1160 return (value as any).ɵcmp ?? null;
1161}
1162
1163function hasNgModuleDef<T>(value: Type<T>): value is NgModuleType<T> {
1164 return Object.hasOwn(value, 'ɵmod');

Callers 7

compileTypesSyncMethod · 0.70
applyTransitiveScopesMethod · 0.70
isStandaloneComponentFunction · 0.70
createComponentMethod · 0.70
createComponentRefMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected