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

Method createChildScope

packages/compiler/src/typecheck/ops/scope.ts:389–396  ·  view source on GitHub ↗

* Constructs a `Scope` given either a `Template` or a list of `Node`s. * This is identical to `Scope.forNodes` which we can't reference in some ops due to * circular dependencies. *. * @param parentScope the `Scope` of the parent template. * @param scopedNode Node that provides the sc

(
    parentScope: Scope,
    scopedNode: Template | IfBlockBranch | ForLoopBlock | HostElement | BoundaryErrorBlock | null,
    children: Node[] | null,
    guard: TcbExpr | null,
  )

Source from the content-addressed store, hash-verified

387 * @param guard an expression that is applied to this scope for type narrowing purposes.
388 */
389 createChildScope(
390 parentScope: Scope,
391 scopedNode: Template | IfBlockBranch | ForLoopBlock | HostElement | BoundaryErrorBlock | null,
392 children: Node[] | null,
393 guard: TcbExpr | null,
394 ): Scope {
395 return Scope.forNodes(this.tcb, parentScope, scopedNode, children, guard);
396 }
397
398 private resolveLocal(ref: LocalSymbol, directive?: TcbDirectiveMetadata): TcbExpr | null {
399 if (ref instanceof Reference && this.referenceOpMap.has(ref)) {

Callers 7

generateBranchMethod · 0.80
getBranchScopeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
generateCatchBranchMethod · 0.80
executeMethod · 0.80

Calls 1

forNodesMethod · 0.80

Tested by

no test coverage detected