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

Fix prefer const rule #5709

Merged
merged 3 commits into from
Nov 18, 2015
Merged

Fix prefer const rule #5709

merged 3 commits into from
Nov 18, 2015

Conversation

DanielRosenwasser
Copy link
Member

@weswigham asap as possible

mhegazy added a commit that referenced this pull request Nov 18, 2015
@mhegazy mhegazy merged commit 7389922 into master Nov 18, 2015
@mhegazy mhegazy deleted the fixPreferConstRule branch November 18, 2015 16:56
else if (isBindingPattern(element.name)) {
this.visitBindingPatternIdentifiers(element.name as ts.BindingPattern);
else {
// Should we throw an exception?
Copy link
Contributor

Choose a reason for hiding this comment

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

The only thing that we can parse as property of ObjectLiteralExpression except PropertyAssignment and ShorthandPropertyAssignment is MethodDeclaration and it is already a grammar error to have it in destructuring assignment. So I think it is safe to ignore other syntax kinds

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants