-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(ast-spec): NewExpression argument can be SpreadElement now #5422
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
fix(ast-spec): NewExpression argument can be SpreadElement now #5422
Conversation
Thanks for the PR, @burtek! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the quick fix!
Is this technically a breaking change @bradzacher?
No problem, was surprised when I found this
If you don't mind, how would this change be a breaking change? I don't see any case how this might break existing code, but obviously I must be missing something? |
Technically it is breaking because someone could previously have code like declare function acceptsExpr(node: Expression): void;
declare const newExpr: NewExpression;
acceptsExpr(newExpr); Which will now have a TS error - thus breaking as the users build could break due to the new version. Though in general we don't classify this sort of correctness change as breaking because the above code is already broken, and all we've done is expose that broken code to the user. |
Right, thanks! |
@JoshuaKGoldberg @bradzacher sooo, in terms of merging...? Don't wanna look like I'm making you hurry or something, just making sure you don't forget about this PR after the conversation 😆 as far as I know there is a release each monday? |
😄 no worries on the ping, you raise a good question! Per Brad's point on this generally only breaking already-broken code I think it's safe to go. But I'll defer to @bradzacher here, as Brad's done much more than me with the AST & managing technical breakage. |
P.S. @burtek - I appreciate you keeping this branch up-to-date, but you don't have to if you don't want. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - thanks for doing this!
Good to know :D Github said branch is out of date, I thought it's necessary xD |
PR Checklist
Overview
NewExpression argument can be SpreadElement now. See #5421 for details