-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
While doing #219 i notice that we have small inconsistency in AST, sometimes we are outputting TSTypeParameterDeclaration
and TSTypeParameterInstantiation
without nodes and sometimes we are omitting this node completely.
typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 1364 to 1368 in 690bff3
if (superClass.types[0] && superClass.types[0].typeArguments) { | |
result.superTypeParameters = this.convertTypeArgumentsToTypeParameters( | |
superClass.types[0].typeArguments | |
); | |
} |
typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 1643 to 1647 in 690bff3
if (node.typeArguments && node.typeArguments.length) { | |
result.typeParameters = this.convertTypeArgumentsToTypeParameters( | |
node.typeArguments | |
); | |
} |
typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 693 to 697 in 690bff3
if (node.typeParameters && node.typeParameters.length) { | |
result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( | |
node.typeParameters | |
); | |
} |
typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 2093 to 2097 in 690bff3
if (node.typeParameters) { | |
result.typeParameters = this.convertTSTypeParametersToTypeParametersDeclaration( | |
node.typeParameters | |
); | |
} |
we should align it, but i'm unsure if we should always have it or not
additionally we should handle #146 in update for it