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

Method resolve

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

* Look up a `ts.Expression` representing the value of some operation in the current `Scope`, * including any parent scope(s). This method always returns a mutable clone of the * `ts.Expression` with the comments cleared. * * @param node a `Node` of the operation in question. The lookup p

(node: LocalSymbol, directive?: TcbDirectiveMetadata)

Source from the content-addressed store, hash-verified

305 */
306
307 resolve(node: LocalSymbol, directive?: TcbDirectiveMetadata): TcbExpr {
308 // Attempt to resolve the operation locally.
309 const res = this.resolveLocal(node, directive);
310 if (res !== null) {
311 return res;
312 } else if (this.parent !== null) {
313 // Check with the parent.
314 return this.parent.resolve(node, directive);
315 } else {
316 throw new Error(`Could not resolve ${node} / ${directive}`);
317 }
318 }
319
320 /**
321 * Add a statement to this scope.

Callers

nothing calls this directly

Calls 2

resolveLocalMethod · 0.95
resolveMethod · 0.65

Tested by

no test coverage detected