(node: StringLiteral)
| 23 | } |
| 24 | |
| 25 | export function getStringLiteralValue(node: StringLiteral): string { |
| 26 | return node.type === "TemplateLiteral" |
| 27 | ? getTemplateLiteralValue(node) |
| 28 | : node.type === "BinaryExpression" |
| 29 | ? getBinaryExpressionValue(node) |
| 30 | : node.value; // Literal or ParamReference |
| 31 | } |
| 32 | |
| 33 | function getTemplateLiteralValue(node: TemplateLiteral): string { |
| 34 | let value = node.quasis[0].value.cooked!; |
no test coverage detected