Description
I've noticed several parts of the code referring to type arguments as type parameters. What's the reason for using typeParameters
here? Seems like there might be some temporary stuff going on? Will this be renamed in the future?
if (node.typeArguments && node.typeArguments.length) {
result.typeParameters = convertTypeArgumentsToTypeParameters(
node.typeArguments
);
}
typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 2045 to 2050 in 45d8ad3
Some example code: playground
someFunction<string>(); // this type argument is incorrectly referred to as a type parameter in the ast
someFunction(1); // this argument is correctly referred to as an argument in the ast
Anyway, I just wanted to start a discussion about it so at least it's in the issue tracker. Also, FWIW, babel-eslint9 correctly refers to them as typeArguments
when I'm looking at https://astexplorer.net, but I'm not so familiar with the babel or eslint ecosystem so I'm not sure how they're related (Edit: Looks like they call it node.typeArguments.params
though...).