MCPcopy Index your code
hub / github.com/angular/angular / ɵɵsetNgModuleScope

Function ɵɵsetNgModuleScope

packages/core/src/render3/scope.ts:55–69  ·  view source on GitHub ↗
(type: any, scope: NgModuleScopeInfoFromDecorator)

Source from the content-addressed store, hash-verified

53 * @codeGenApi
54 */
55export function ɵɵsetNgModuleScope(type: any, scope: NgModuleScopeInfoFromDecorator): unknown {
56 return noSideEffects(() => {
57 const ngModuleDef = getNgModuleDefOrThrow(type);
58 ngModuleDef.declarations = convertToTypeArray(scope.declarations || EMPTY_ARRAY);
59 ngModuleDef.imports = convertToTypeArray(scope.imports || EMPTY_ARRAY);
60 ngModuleDef.exports = convertToTypeArray(scope.exports || EMPTY_ARRAY);
61
62 if (scope.bootstrap) {
63 // This only happens in local compilation mode.
64 ngModuleDef.bootstrap = convertToTypeArray(scope.bootstrap);
65 }
66
67 depsTracker.registerNgModule(type, scope);
68 });
69}
70
71function convertToTypeArray(
72 values: Type<any>[] | (() => Type<any>[]) | RawScopeInfoFromDecorator[],

Callers 1

Calls 4

noSideEffectsFunction · 0.90
getNgModuleDefOrThrowFunction · 0.90
convertToTypeArrayFunction · 0.85
registerNgModuleMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…