Skip to content

Commit 85454e5

Browse files
committed
Unify expression position checks for template literals
1 parent e096c23 commit 85454e5

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
@@ -1636,7 +1636,6 @@ namespace ts {
16361636
case SyntaxKind.ConditionalExpression:
16371637
case SyntaxKind.SpreadElement:
16381638
case SyntaxKind.TemplateExpression:
1639-
case SyntaxKind.NoSubstitutionTemplateLiteral:
16401639
case SyntaxKind.OmittedExpression:
16411640
case SyntaxKind.JsxElement:
16421641
case SyntaxKind.JsxSelfClosingElement:
@@ -1658,6 +1657,7 @@ namespace ts {
16581657
case SyntaxKind.NumericLiteral:
16591658
case SyntaxKind.BigIntLiteral:
16601659
case SyntaxKind.StringLiteral:
1660+
case SyntaxKind.NoSubstitutionTemplateLiteral:
16611661
case SyntaxKind.ThisKeyword:
16621662
return isInExpressionContext(node);
16631663
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)