-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Some properties named typeParameters instead of typeArguments #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
this is good point, i did a lot of renaming for consistency in last few weeks, and i missed this one |
@armano2 sorry, I think my bad (first day looking at all this code). This looks like a question I should be raising in babel-parser? See here: Edit: Also in babel-types... https://github.com/babel/babel/blob/4c2f8d9337c2c45da345e536c1f44157d64a14bd/packages/babel-types/src/definitions/typescript.js#L83 |
I opened babel/babel#9418 ...I'm not sure how this project relates to babel's parser (haven't looked into it much). |
we are trying to make AST ~same as babel to improve user experience, but we have some changes to AST you can find know issues with babel AST here: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/tests/ast-alignment/utils.ts#L84 |
@armano2 @bradzacher @dsherret following #120, is this still an issue for anywhere in particular? I see a lot of functions like |
I have no idea tbh - we probably need to review the entire AST to figure out! |
note: investigate before 6.0.0 release |
I threw up a draft of what this could look like on our end: #5384 Unless I've misinterpreted the code, it looks like we'll need Babel to also apply these suggested changes (babel/babel#9418) first. Marking as blocked until then. |
We don't need babel to maintain compat with us. It's nice if they do but there's no requirement. We already have a number of divergences in the AST which makes us incompatible. |
Oh, interesting - how should we change the failing spec tests in #5384 then? |
@JoshuaKGoldberg this file defines the set of "ignored" fixtures - we can just add the failing fixtures. Ideally we should prioritise migrating all the tests across to the |
#5384 was merged into |
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?typescript-eslint/packages/typescript-estree/src/convert.ts
Lines 2045 to 2050 in 45d8ad3
Some example code: playground
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 itnode.typeArguments.params
though...).The text was updated successfully, but these errors were encountered: