Skip to content
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

Merged
merged 4 commits into from
Oct 1, 2018

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Jul 30, 2018

Fixes: #26007

I hope this helps to decide if you want to accept #26007 as you can now see what baseline changes it causes.

@mhegazy mhegazy requested review from weswigham and ahejlsberg July 31, 2018 18:28
@@ -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];
~
Copy link
Member

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.

Copy link
Member

@weswigham weswigham left a 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.

@RyanCavanaugh
Copy link
Member

Will run this by @ahejlsberg tomorrow but I agree the baseline diffs indicate all goodness

@RyanCavanaugh RyanCavanaugh self-assigned this Sep 6, 2018
@RyanCavanaugh
Copy link
Member

"tomorrow"

@RyanCavanaugh RyanCavanaugh merged commit 3331d07 into microsoft:master Oct 1, 2018
@RyanCavanaugh
Copy link
Member

Thanks @ajafff !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants