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

Function getNgModuleDefOrThrow

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

Source from the content-addressed store, hash-verified

19}
20
21export function getNgModuleDefOrThrow<T>(type: any): NgModuleDef<T> | never {
22 const ngModuleDef = getNgModuleDef<T>(type);
23 if (!ngModuleDef) {
24 throw new RuntimeError(
25 RuntimeErrorCode.MISSING_NG_MODULE_DEFINITION,
26 (typeof ngDevMode === 'undefined' || ngDevMode) &&
27 `Type ${stringify(type)} does not have 'ɵmod' property.`,
28 );
29 }
30 return ngModuleDef;
31}
32
33/**
34 * The following getter methods retrieve the definition from the type. Currently the retrieval

Callers 5

ɵɵsetNgModuleScopeFunction · 0.90
transitiveScopesForFunction · 0.90
computeNgModuleScopeMethod · 0.90

Calls 2

stringifyFunction · 0.90
getNgModuleDefFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…