(name)
| 15222 | } |
| 15223 | ts.isComputedNonLiteralName = isComputedNonLiteralName; |
| 15224 | function tryGetTextOfPropertyName(name) { |
| 15225 | switch (name.kind) { |
| 15226 | case 79 /* SyntaxKind.Identifier */: |
| 15227 | case 80 /* SyntaxKind.PrivateIdentifier */: |
| 15228 | return name.escapedText; |
| 15229 | case 10 /* SyntaxKind.StringLiteral */: |
| 15230 | case 8 /* SyntaxKind.NumericLiteral */: |
| 15231 | case 14 /* SyntaxKind.NoSubstitutionTemplateLiteral */: |
| 15232 | return ts.escapeLeadingUnderscores(name.text); |
| 15233 | case 162 /* SyntaxKind.ComputedPropertyName */: |
| 15234 | if (isStringOrNumericLiteralLike(name.expression)) |
| 15235 | return ts.escapeLeadingUnderscores(name.expression.text); |
| 15236 | return undefined; |
| 15237 | default: |
| 15238 | return ts.Debug.assertNever(name); |
| 15239 | } |
| 15240 | } |
| 15241 | ts.tryGetTextOfPropertyName = tryGetTextOfPropertyName; |
| 15242 | function getTextOfPropertyName(name) { |
| 15243 | return ts.Debug.checkDefined(tryGetTextOfPropertyName(name)); |
no test coverage detected
searching dependent graphs…