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

Method isLocal

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

Returns whether a template symbol is defined locally within the current scope.

(node: Variable | LetDeclaration | Reference)

Source from the content-addressed store, hash-verified

366
367 /** Returns whether a template symbol is defined locally within the current scope. */
368 isLocal(node: Variable | LetDeclaration | Reference): boolean {
369 if (node instanceof Variable) {
370 return this.varMap.has(node);
371 }
372 if (node instanceof LetDeclaration) {
373 return this.letDeclOpMap.has(node.name);
374 }
375 return this.referenceOpMap.has(node);
376 }
377
378 /**
379 * Constructs a `Scope` given either a `Template` or a list of `Node`s.

Callers 2

appendNodeMethod · 0.95

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected