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

Function getNgModuleDef

packages/core/src/render3/def_getters.ts:16–19  ·  view source on GitHub ↗
(type: any)

Source from the content-addressed store, hash-verified

14import type {ComponentDef, DirectiveDef, PipeDef} from './interfaces/definition';
15
16export function getNgModuleDef<T>(type: any): NgModuleDef<T> | null {
17 assertTypeDefined(type, '@NgModule');
18 return type[NG_MOD_DEF] || null;
19}
20
21export function getNgModuleDefOrThrow<T>(type: any): NgModuleDef<T> | never {
22 const ngModuleDef = getNgModuleDef<T>(type);

Callers 10

createModuleFunction · 0.90
assertNgModuleTypeFunction · 0.90
constructorMethod · 0.90
computeCombinedExportsFunction · 0.90
isNgModuleFunction · 0.90
verifyStandaloneImportFunction · 0.90
resolveNgModulesDeclsMethod · 0.90
getNgModuleDefOrThrowFunction · 0.85

Calls 1

assertTypeDefinedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…