@@ -1449,7 +1449,7 @@ export function tsPlugin(options?: {
1449
1449
// type and not as a const signifier. We'll *never* be able to find this
1450
1450
// name, since const isn't allowed as a type name. So in this instance we
1451
1451
// get to pretend we're the type checker.
1452
- if ( typeReference . typeParameters ) {
1452
+ if ( typeReference . typeParameters || typeReference . typeArguments ) {
1453
1453
this . raise (
1454
1454
typeReference . typeName . start ,
1455
1455
TypeScriptError . CannotFindName ( {
@@ -1573,7 +1573,7 @@ export function tsPlugin(options?: {
1573
1573
node . qualifier = this . tsParseEntityName ( ) ;
1574
1574
}
1575
1575
if ( this . tsMatchLeftRelational ( ) ) {
1576
- node . typeParameters = this . tsParseTypeArguments ( ) ;
1576
+ node . typeArguments = this . tsParseTypeArguments ( ) ;
1577
1577
}
1578
1578
return this . finishNode ( node , 'TSImportType' ) ;
1579
1579
}
@@ -1587,7 +1587,7 @@ export function tsPlugin(options?: {
1587
1587
node . exprName = this . tsParseEntityName ( ) ;
1588
1588
}
1589
1589
if ( ! this . hasPrecedingLineBreak ( ) && this . tsMatchLeftRelational ( ) ) {
1590
- node . typeParameters = this . tsParseTypeArguments ( ) ;
1590
+ node . typeArguments = this . tsParseTypeArguments ( ) ;
1591
1591
}
1592
1592
return this . finishNode ( node , 'TSTypeQuery' ) ;
1593
1593
}
@@ -1652,7 +1652,7 @@ export function tsPlugin(options?: {
1652
1652
1653
1653
if (
1654
1654
type . type === 'TSTypeReference' &&
1655
- ! type . typeParameters &&
1655
+ ! type . typeArguments &&
1656
1656
type . typeName . type === 'Identifier'
1657
1657
) {
1658
1658
labeledNode . label = type . typeName as any ;
@@ -1735,7 +1735,7 @@ export function tsPlugin(options?: {
1735
1735
const node = this . startNode ( ) ;
1736
1736
node . typeName = this . tsParseEntityName ( ) ;
1737
1737
if ( ! this . hasPrecedingLineBreak ( ) && this . tsMatchLeftRelational ( ) ) {
1738
- node . typeParameters = this . tsParseTypeArguments ( ) ;
1738
+ node . typeArguments = this . tsParseTypeArguments ( ) ;
1739
1739
}
1740
1740
return this . finishNode ( node , 'TSTypeReference' ) ;
1741
1741
}
@@ -2886,7 +2886,7 @@ export function tsPlugin(options?: {
2886
2886
// ---start parseNewCallee extension
2887
2887
const { callee } = node ;
2888
2888
if ( callee . type === 'TSInstantiationExpression' && ! callee . extra ?. parenthesized ) {
2889
- node . typeParameters = callee . typeParameters ;
2889
+ node . typeArguments = callee . typeArguments ;
2890
2890
node . callee = callee . expression ;
2891
2891
}
2892
2892
// ---end
@@ -4591,7 +4591,7 @@ export function tsPlugin(options?: {
4591
4591
startLoc ,
4592
4592
_optionalChained
4593
4593
) ;
4594
- result . typeParameters = typeArguments ;
4594
+ result . typeArguments = typeArguments ;
4595
4595
return result ;
4596
4596
}
4597
4597
@@ -4609,7 +4609,7 @@ export function tsPlugin(options?: {
4609
4609
) ;
4610
4610
// Handles invalid case: `f<T>(a:b)`
4611
4611
this . tsCheckForInvalidTypeCasts ( node . arguments ) ;
4612
- node . typeParameters = typeArguments ;
4612
+ node . typeArguments = typeArguments ;
4613
4613
if ( _optionalChained ) {
4614
4614
node . optional = isOptionalCall ;
4615
4615
}
@@ -4633,7 +4633,7 @@ export function tsPlugin(options?: {
4633
4633
}
4634
4634
const node = this . startNodeAt ( startPos , startLoc ) ;
4635
4635
node . expression = base ;
4636
- node . typeParameters = typeArguments ;
4636
+ node . typeArguments = typeArguments ;
4637
4637
return this . finishNode ( node , 'TSInstantiationExpression' ) ;
4638
4638
} ) ;
4639
4639
if ( missingParenErrorLoc ) {
@@ -5152,7 +5152,7 @@ export function tsPlugin(options?: {
5152
5152
const typeArguments = this . tsTryParseAndCatch ( ( ) =>
5153
5153
this . tsParseTypeArgumentsInExpression ( )
5154
5154
) ;
5155
- if ( typeArguments ) node . typeParameters = typeArguments ;
5155
+ if ( typeArguments ) node . typeArguments = typeArguments ;
5156
5156
}
5157
5157
5158
5158
node . attributes = [ ] ;
0 commit comments