File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ namespace ts.SignatureHelp {
154
154
const tagExpression = < TaggedTemplateExpression > templateExpression . parent ;
155
155
Debug . assert ( templateExpression . kind === SyntaxKind . TemplateExpression ) ;
156
156
157
- const argumentIndex = 1 ;
157
+ const argumentIndex = isInsideTemplateLiteral ( node , position ) ? 0 : 1 ;
158
158
159
159
return getArgumentListInfoForTemplate ( tagExpression , argumentIndex , sourceFile ) ;
160
160
}
@@ -165,7 +165,7 @@ namespace ts.SignatureHelp {
165
165
Debug . assert ( templateExpression . kind === SyntaxKind . TemplateExpression ) ;
166
166
167
167
// If we're just after a template tail, don't show signature help.
168
- if ( node . kind === SyntaxKind . TemplateTail ) {
168
+ if ( node . kind === SyntaxKind . TemplateTail && ! isInsideTemplateLiteral ( node , position ) ) {
169
169
return undefined ;
170
170
}
171
171
Original file line number Diff line number Diff line change @@ -955,7 +955,7 @@ namespace ts {
955
955
return SyntaxKind . FirstPunctuation <= kind && kind <= SyntaxKind . LastPunctuation ;
956
956
}
957
957
958
- export function isInsideTemplateLiteral ( node : LiteralExpression , position : number ) {
958
+ export function isInsideTemplateLiteral ( node : LiteralLikeNode , position : number ) {
959
959
return isTemplateLiteralKind ( node . kind )
960
960
&& ( node . getStart ( ) < position && position < node . getEnd ( ) ) || ( ! ! node . isUnterminated && position === node . getEnd ( ) ) ;
961
961
}
You can’t perform that action at this time.
0 commit comments