(ts: TypeScript, n: typescript.Node)
| 89 | } |
| 90 | |
| 91 | function literalToObj(ts: TypeScript, n: typescript.Node) { |
| 92 | if (ts.isNumericLiteral(n)) { |
| 93 | return +n.text |
| 94 | } |
| 95 | if (ts.isStringLiteral(n)) { |
| 96 | return n.text |
| 97 | } |
| 98 | if (n.kind === ts.SyntaxKind.TrueKeyword) { |
| 99 | return true |
| 100 | } |
| 101 | if (n.kind === ts.SyntaxKind.FalseKeyword) { |
| 102 | return false |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | function objectLiteralExpressionToObj( |
| 107 | ts: TypeScript, |
no outgoing calls
no test coverage detected