File tree Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,7 @@ module ts {
491
491
case SyntaxKind . BinaryExpression :
492
492
case SyntaxKind . ConditionalExpression :
493
493
case SyntaxKind . TemplateExpression :
494
+ case SyntaxKind . NoSubstitutionTemplateLiteral :
494
495
case SyntaxKind . OmittedExpression :
495
496
return true ;
496
497
case SyntaxKind . QualifiedName :
@@ -503,7 +504,6 @@ module ts {
503
504
// fall through
504
505
case SyntaxKind . NumericLiteral :
505
506
case SyntaxKind . StringLiteral :
506
- case SyntaxKind . NoSubstitutionTemplateLiteral :
507
507
var parent = node . parent ;
508
508
switch ( parent . kind ) {
509
509
case SyntaxKind . VariableDeclaration :
@@ -532,6 +532,8 @@ module ts {
532
532
( < ForInStatement > parent ) . expression === node ;
533
533
case SyntaxKind . TypeAssertion :
534
534
return node === ( < TypeAssertion > parent ) . operand ;
535
+ case SyntaxKind . TemplateSpan :
536
+ return node === ( < TemplateSpan > parent ) . expression ;
535
537
default :
536
538
if ( isExpression ( parent ) ) {
537
539
return true ;
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ var x = x => `abc${ x }def`;
3
3
>x : (x: any) => string
4
4
>x => `abc${ x }def` : (x: any) => string
5
5
>x : any
6
- >x : unknown
6
+ >x : any
7
7
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ var x = x => `abc${ x }def`;
3
3
>x : (x: any) => string
4
4
>x => `abc${ x }def` : (x: any) => string
5
5
>x : any
6
- >x : unknown
6
+ >x : any
7
7
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////var [|x|] = 10;
4
+ ////var y = `${ [|x|] } ${ [|x|] }`
5
+
6
+ test . ranges ( ) . forEach ( targetRange => {
7
+ goTo . position ( targetRange . start ) ;
8
+
9
+ test . ranges ( ) . forEach ( range => {
10
+ verify . referencesAtPositionContains ( range ) ;
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////function [|f|](...rest: any[]) { }
4
+ ////[|f|] `${ [|f|] } ${ [|f|] }`
5
+
6
+ test . ranges ( ) . forEach ( targetRange => {
7
+ goTo . position ( targetRange . start ) ;
8
+
9
+ test . ranges ( ) . forEach ( range => {
10
+ verify . referencesAtPositionContains ( range ) ;
11
+ }
12
+ }
You can’t perform that action at this time.
0 commit comments