-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Infer array rest as tuple if possible #26070
Conversation
@@ -231,8 +237,14 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9): | |||
var a3: any[]; | |||
var [...a] = [1, 2, 3]; | |||
var [x, ...a] = [1, 2, 3]; | |||
~ |
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.
I'd change the variable names at these new errors in this test so that you're comparing with the expected type and there's no error.
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.
❤️ These baseline updates look great. Small comments on improving the test output a bit, but it looks good to me.
Will run this by @ahejlsberg tomorrow but I agree the baseline diffs indicate all goodness |
"tomorrow" |
Thanks @ajafff ! |
Fixes: #26007
I hope this helps to decide if you want to accept #26007 as you can now see what baseline changes it causes.