File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,12 @@ import type * as t from '@babel/types'
15
15
16
16
function transformArguments ( argument : t . Node , s : MagicString , offset : number ) {
17
17
if (
18
- argument . type === 'Identifier' ||
19
- argument . type === 'MemberExpression' ||
20
- argument . type === 'OptionalMemberExpression'
18
+ [
19
+ 'Identifier' ,
20
+ 'MemberExpression' ,
21
+ 'OptionalMemberExpression' ,
22
+ 'TSInstantiationExpression' ,
23
+ ] . includes ( argument . type )
21
24
) {
22
25
s . appendLeft ( argument . start ! + offset , '$$(' )
23
26
s . appendRight ( argument . end ! + offset , ')' )
Original file line number Diff line number Diff line change @@ -20,7 +20,11 @@ function transform({
20
20
function transformArguments (
21
21
argument : import ( 'typescript/lib/tsserverlibrary' ) . Node
22
22
) {
23
- if ( ts . isIdentifier ( argument ) || ts . isPropertyAccessExpression ( argument ) ) {
23
+ if (
24
+ ts . isIdentifier ( argument ) ||
25
+ ts . isPropertyAccessExpression ( argument ) ||
26
+ ts . isExpressionWithTypeArguments ( argument )
27
+ ) {
24
28
replaceSourceRange (
25
29
codes ,
26
30
source ,
You can’t perform that action at this time.
0 commit comments