(x?: string | string[] | number | boolean | null)
| 137 | |
| 138 | // TODO do not allow arrays here |
| 139 | function interpolate(x?: string | string[] | number | boolean | null): SafeExpr | string { |
| 140 | return typeof x == "number" || typeof x == "boolean" || x === null |
| 141 | ? x |
| 142 | : safeStringify(Array.isArray(x) ? x.join(",") : x) |
| 143 | } |
| 144 | |
| 145 | export function stringify(x: unknown): Code { |
| 146 | return new _Code(safeStringify(x)) |
no test coverage detected
searching dependent graphs…