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

Function translateInput

packages/compiler/src/typecheck/ops/inputs.ts:34–42  ·  view source on GitHub ↗
(value: AST | string, tcb: Context, scope: Scope)

Source from the content-addressed store, hash-verified

32 * Translates the given attribute binding to a `ts.Expression`.
33 */
34export function translateInput(value: AST | string, tcb: Context, scope: Scope): TcbExpr {
35 if (typeof value === 'string') {
36 // For regular attributes with a static string value, use the represented string literal.
37 return new TcbExpr(TcbExpr.quoteAndEscape(value));
38 } else {
39 // Produce an expression representing the value of the binding.
40 return tcbExpression(value, tcb, scope);
41 }
42}
43
44/**
45 * A `TcbOp` which generates code to check input bindings on an element that correspond with the

Callers 2

executeMethod · 0.90
executeMethod · 0.85

Calls 2

tcbExpressionFunction · 0.90
quoteAndEscapeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…