* 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)
| 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. |
nothing calls this directly
no test coverage detected