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

Method execute

packages/compiler/src/typecheck/ops/let.ts:34–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 override readonly optional = false;
33
34 override execute(): TcbExpr {
35 const id = new TcbExpr(this.tcb.allocateId()).addParseSpanInfo(this.node.nameSpan);
36 const value = tcbExpression(this.node.value, this.tcb, this.scope).wrapForTypeChecker();
37 // Value needs to be wrapped, because spans for the expressions inside of it can
38 // be picked up incorrectly as belonging to the full variable declaration.
39 const varStatement = new TcbExpr(`const ${id.print()} = ${value.print()}`);
40 varStatement.addParseSpanInfo(this.node.sourceSpan);
41 this.scope.addStatement(varStatement);
42 return id;
43 }
44}

Callers

nothing calls this directly

Calls 6

addParseSpanInfoMethod · 0.95
tcbExpressionFunction · 0.90
allocateIdMethod · 0.80
wrapForTypeCheckerMethod · 0.80
addStatementMethod · 0.80
printMethod · 0.45

Tested by

no test coverage detected