Navigation Menu

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

Allow tuple rest trailing comma #10800

Merged

Conversation

yeonjuan
Copy link
Contributor

@yeonjuan yeonjuan commented Dec 3, 2019

Q                       A
Fixed Issues? Fixes #10769
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

this.checkCommaAfterRest(charCodes.rightSquareBracket);
if (
this.match(tt.comma) &&
this.lookaheadCharCode() !== charCodes.rightSquareBracket
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there already a test for when ...a, is not followed by ]?

Copy link
Contributor Author

@yeonjuan yeonjuan Dec 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@nicolo-ribaudo yes! in the tuple-rest-invalid.

@JLHwung JLHwung added area: typescript PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Dec 3, 2019
@nicolo-ribaudo
Copy link
Member

Thanks!

@nicolo-ribaudo nicolo-ribaudo merged commit d18afbd into babel:master Dec 3, 2019
@yeonjuan yeonjuan deleted the fix-rest-tuple-trailing-comma branch February 13, 2020 14:23
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 15, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trailing comma in typescript spread
4 participants