Skip to content

Allow tuple rest trailing comma#10800

Merged
nicolo-ribaudo merged 1 commit intobabel:masterfrom
yeonjuan:fix-rest-tuple-trailing-comma
Dec 3, 2019
Merged

Allow tuple rest trailing comma#10800
nicolo-ribaudo merged 1 commit intobabel:masterfrom
yeonjuan:fix-rest-tuple-trailing-comma

Conversation

@yeonjuan
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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