From e1b62ae155c5930a3e71f90e9a724cfa95bd50e8 Mon Sep 17 00:00:00 2001 From: Max Heiber Date: Sun, 26 Aug 2018 21:16:01 -0400 Subject: [PATCH] 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 --- src/compiler/types.ts | 2 +- src/compiler/utilities.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4b2357bc63e77..f99c11defeb8e 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1188,7 +1188,7 @@ namespace ts { export interface StringLiteral extends LiteralExpression { kind: SyntaxKind.StringLiteral; - /* @internal */ textSourceNode?: Identifier | PrivateName | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms). + /* @internal */ textSourceNode?: Identifier | StringLiteralLike | NumericLiteral; // Allows a StringLiteral to get its text from another node (used by transforms). /** Note: this is only set when synthesizing a node, not during parsing. */ /* @internal */ singleQuote?: boolean; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b8e12539e07da..4fa7983a33f5d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2650,7 +2650,6 @@ namespace ts { export function isPropertyNameLiteral(node: Node): node is PropertyNameLiteral { switch (node.kind) { case SyntaxKind.Identifier: - // TODO: should this be here? case SyntaxKind.PrivateName: case SyntaxKind.StringLiteral: case SyntaxKind.NoSubstitutionTemplateLiteral: