Skip to content

Commit e61f075

Browse files
committed
StringLiteral.textSourceNode cannot be PrivateName
undo an accidental change that made it so StringLiteral.textSourceNode could be a private name. Signed-off-by: Max Heiber <max.heiber@gmail.com>
1 parent 0b8c723 commit e61f075

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ namespace ts {
11881188

11891189
export interface StringLiteral extends LiteralExpression {
11901190
kind: SyntaxKind.StringLiteral;
1191-
/* @internal */ textSourceNode?: Identifier | PrivateName | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms).
1191+
/* @internal */ textSourceNode?: Identifier | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms).
11921192
/** Note: this is only set when synthesizing a node, not during parsing. */
11931193
/* @internal */ singleQuote?: boolean;
11941194
}

src/compiler/utilities.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,6 @@ namespace ts {
26502650
export function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral {
26512651
switch (node.kind) {
26522652
case SyntaxKind.Identifier:
2653-
// TODO: should this be here?
26542653
case SyntaxKind.PrivateName:
26552654
case SyntaxKind.StringLiteral:
26562655
case SyntaxKind.NoSubstitutionTemplateLiteral:

0 commit comments

Comments
 (0)