Skip to content

Commit c604676

Browse files
committed
Unify expression position checks for template literals
1 parent 0a9f0c7 commit c604676

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
@@ -1692,7 +1692,6 @@ namespace ts {
16921692
case SyntaxKind.ConditionalExpression:
16931693
case SyntaxKind.SpreadElement:
16941694
case SyntaxKind.TemplateExpression:
1695-
case SyntaxKind.NoSubstitutionTemplateLiteral:
16961695
case SyntaxKind.OmittedExpression:
16971696
case SyntaxKind.JsxElement:
16981697
case SyntaxKind.JsxSelfClosingElement:
@@ -1715,6 +1714,7 @@ namespace ts {
17151714
case SyntaxKind.NumericLiteral:
17161715
case SyntaxKind.BigIntLiteral:
17171716
case SyntaxKind.StringLiteral:
1717+
case SyntaxKind.NoSubstitutionTemplateLiteral:
17181718
case SyntaxKind.ThisKeyword:
17191719
return isInExpressionContext(node);
17201720
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)