Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
I've noticed several parts of the code referring to type arguments as type parameters. What's the reason for usingtypeParameters
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 in45d8ad3
if(node.typeArguments){ | |
result.typeParameters=this.convertTypeArgumentsToTypeParameters( | |
node.typeArguments, | |
node, | |
); | |
} |
Some example code:playground
someFunction<string>();// this type argument is incorrectly referred to as a type parameter in the astsomeFunction(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 astypeArguments
when I'm looking athttps://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 itnode.typeArguments.params
though...).