Skip to content

Commit 49a4352

Browse files
committed
Unify expression position checks for template literals
1 parent ee1c888 commit 49a4352

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,6 @@ namespace ts {
16891689
case SyntaxKind.ConditionalExpression:
16901690
case SyntaxKind.SpreadElement:
16911691
case SyntaxKind.TemplateExpression:
1692-
case SyntaxKind.NoSubstitutionTemplateLiteral:
16931692
case SyntaxKind.OmittedExpression:
16941693
case SyntaxKind.JsxElement:
16951694
case SyntaxKind.JsxSelfClosingElement:
@@ -1711,6 +1710,7 @@ namespace ts {
17111710
case SyntaxKind.NumericLiteral:
17121711
case SyntaxKind.BigIntLiteral:
17131712
case SyntaxKind.StringLiteral:
1713+
case SyntaxKind.NoSubstitutionTemplateLiteral:
17141714
case SyntaxKind.ThisKeyword:
17151715
return isInExpressionContext(node);
17161716
default:
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
=== tests/cases/compiler/noSubstitutionTemplateStringLiteralTypes.ts ===
22
const x: `foo` = "foo";
33
>x : "foo"
4-
>`foo` : "foo"
54
>"foo" : "foo"
65

0 commit comments

Comments
 (0)