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

emit error on destructuring of rest property #29609

Merged
merged 1 commit into from Apr 25, 2019

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Jan 27, 2019

Fixes: #26005

==== tests/cases/conformance/es6/destructuring/restPropertyWithBindingPattern.ts (7 errors) ====
({...{}} = {});
~~
!!! error TS2501: A rest element cannot contain a binding pattern.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

"rest element" is not quite correct as it's actually a "rest property", but this is what's used consistently in all other diagnostics

@ajafff ajafff force-pushed the rest-property-destructuring branch from 2245ed4 to b328de6 Compare January 27, 2019 17:45
@RyanCavanaugh RyanCavanaugh merged commit b45df89 into microsoft:master Apr 25, 2019
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.

Missing error if DestructuringRestProperty is assigned to object or array literal
2 participants