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

Method isLocal

packages/compiler/src/typecheck/ops/scope.ts:354–362  ·  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

352
353 /** Returns whether a template symbol is defined locally within the current scope. */
354 isLocal(node: Variable | LetDeclaration | Reference): boolean {
355 if (node instanceof Variable) {
356 return this.varMap.has(node);
357 }
358 if (node instanceof LetDeclaration) {
359 return this.letDeclOpMap.has(node.name);
360 }
361 return this.referenceOpMap.has(node);
362 }
363
364 /**
365 * 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