Skip to content

allow BindingPattern in BindingRestElement #26008

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

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Jul 27, 2018

Part of #6275

Downlevel emit already works as expected. Those baselines were not changed.
Just to make sure, here's an example in the playground: https://agentcooper.github.io/typescript-play/?target=1#code/CYUwxgNghgTiAEEQBd7IK4AckC54G0BnZGASwDsBzAGnnPQFsAjEGWpgew6SnIF0A3ACgkqfFFoA6afiZTpAbwAMeMAF8+feAF40WJAKA

@@ -29188,10 +29188,6 @@ namespace ts {
}
checkGrammarForDisallowedTrailingComma(elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);

if (node.name.kind === SyntaxKind.ArrayBindingPattern || node.name.kind === SyntaxKind.ObjectBindingPattern) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that this never checked BindingRestProperty because that has a parse error: https://agentcooper.github.io/typescript-play/#code/DYUwLgBA3gdHUF8EQLzQQGmnGBtAusmogNxA

@mhegazy mhegazy requested a review from weswigham July 30, 2018 18:57
@mhegazy
Copy link
Contributor

mhegazy commented Jul 30, 2018

@weswigham can you please review

@mhegazy mhegazy merged commit 114cd80 into microsoft:master Jul 31, 2018
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