@@ -501,8 +501,9 @@ function handle_type_annotation(node, state) {
501
501
case 'TSTypeReference' :
502
502
handle ( node . typeName , state ) ;
503
503
504
- // @ts -expect-error `acorn-typescript` and `@typescript-esling/types` have slightly different type definitions
505
- if ( node . typeParameters ) handle_type_annotation ( node . typeParameters , state ) ;
504
+ if ( node . typeArguments ) {
505
+ handle_type_annotation ( node . typeArguments , state ) ;
506
+ }
506
507
break ;
507
508
case 'TSTypeParameterInstantiation' :
508
509
case 'TSTypeParameterDeclaration' :
@@ -514,7 +515,7 @@ function handle_type_annotation(node, state) {
514
515
state . commands . push ( '>' ) ;
515
516
break ;
516
517
case 'TSTypeParameter' :
517
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
518
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
518
519
state . commands . push ( node . name ) ;
519
520
520
521
if ( node . constraint ) {
@@ -536,14 +537,14 @@ function handle_type_annotation(node, state) {
536
537
case 'TSFunctionType' :
537
538
if ( node . typeParameters ) handle_type_annotation ( node . typeParameters , state ) ;
538
539
539
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
540
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
540
541
const parameters = node . parameters ;
541
542
state . commands . push ( '(' ) ;
542
543
sequence ( parameters , state , false , handle ) ;
543
544
544
545
state . commands . push ( ') => ' ) ;
545
546
546
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
547
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
547
548
handle_type_annotation ( node . typeAnnotation . typeAnnotation , state ) ;
548
549
break ;
549
550
case 'TSIndexSignature' :
@@ -552,19 +553,19 @@ function handle_type_annotation(node, state) {
552
553
sequence ( indexParameters , state , false , handle ) ;
553
554
state . commands . push ( ']' ) ;
554
555
555
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
556
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
556
557
handle_type_annotation ( node . typeAnnotation , state ) ;
557
558
break ;
558
559
case 'TSMethodSignature' :
559
560
handle ( node . key , state ) ;
560
561
561
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
562
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
562
563
const parametersSignature = node . parameters ;
563
564
state . commands . push ( '(' ) ;
564
565
sequence ( parametersSignature , state , false , handle ) ;
565
566
state . commands . push ( ')' ) ;
566
567
567
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
568
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
568
569
handle_type_annotation ( node . typeAnnotation , state ) ;
569
570
break ;
570
571
case 'TSExpressionWithTypeArguments' :
@@ -715,8 +716,7 @@ const shared = {
715
716
state . commands . push ( '?.' ) ;
716
717
}
717
718
718
- // @ts -expect-error
719
- if ( node . typeParameters ) handle_type_annotation ( node . typeParameters , state ) ;
719
+ if ( node . typeArguments ) handle_type_annotation ( node . typeArguments , state ) ;
720
720
721
721
const open = create_sequence ( ) ;
722
722
const join = create_sequence ( ) ;
@@ -852,7 +852,7 @@ const shared = {
852
852
state . commands . push ( '...' ) ;
853
853
handle ( node . argument , state ) ;
854
854
855
- // @ts -expect-error `acorn-typescript` and `@typescript-esling /types` have slightly different type definitions
855
+ // @ts -expect-error `acorn-typescript` and `@typescript-eslint /types` have slightly different type definitions
856
856
if ( node . typeAnnotation ) handle_type_annotation ( node . typeAnnotation , state ) ;
857
857
}
858
858
} ;
0 commit comments