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

Function scopeArray

packages/compiler-cli/preprocessor/src/processor.ts:3199–3204  ·  view source on GitHub ↗
(refs: nga.ReferenceMetadata[])

Source from the content-addressed store, hash-verified

3197 // https://github.com/angular/angular/blob/c1829f6/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.ts#L1032-L1040
3198 const mayRequireCycleProtection = ngModule.remoteScopesMayRequireCycleProtection ?? false;
3199 const scopeArray = (refs: nga.ReferenceMetadata[]): o.Expression => {
3200 const array = o.literalArr(refs.map((ref) => refToExpression(ref)));
3201 return mayRequireCycleProtection && refs.length > 0
3202 ? o.fn([], [new o.ReturnStatement(array)])
3203 : array;
3204 };
3205
3206 for (const target of scopeTargets) {
3207 // Emitted unguarded: remote scoping is how a cyclic component gets its directives at

Callers 1

compileNgModuleDefFunction · 0.85

Calls 3

refToExpressionFunction · 0.85
mapMethod · 0.80
fnMethod · 0.45

Tested by

no test coverage detected