(value: AST | string, tcb: Context, scope: Scope)
| 32 | * Translates the given attribute binding to a `ts.Expression`. |
| 33 | */ |
| 34 | export 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 |
no test coverage detected
searching dependent graphs…