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

Method resolve

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

291 * look up instead of the default for an element or template node.
292 */
293 resolve(node: LocalSymbol, directive?: TcbDirectiveMetadata): TcbExpr {
294 // Attempt to resolve the operation locally.
295 const res = this.resolveLocal(node, directive);
296 if (res !== null) {
297 return res;
298 } else if (this.parent !== null) {
299 // Check with the parent.
300 return this.parent.resolve(node, directive);
301 } else {
302 throw new Error(`Could not resolve ${node} / ${directive}`);
303 }
304 }
305
306 /**
307 * 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