Skip to content

Commit 5eca8a3

Browse files
committed
Remove unsafe casts
1 parent 3383d8a commit 5eca8a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,10 @@ namespace ts {
481481
return (<Identifier>name).text;
482482
case SyntaxKind.StringLiteral:
483483
case SyntaxKind.NumericLiteral:
484-
return (<LiteralExpression>name).text as UnderscoreEscapedString;
484+
return escapeLeadingUnderscores((<LiteralExpression>name).text);
485485
case SyntaxKind.ComputedPropertyName:
486486
if (isStringOrNumericLiteral((<ComputedPropertyName>name).expression)) {
487-
return (<LiteralExpression>(<ComputedPropertyName>name).expression).text as UnderscoreEscapedString;
487+
return escapeLeadingUnderscores((<LiteralExpression>(<ComputedPropertyName>name).expression).text);
488488
}
489489
}
490490

0 commit comments

Comments
 (0)