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

Disallow destructured parameter properties #1673

Merged
merged 6 commits into from
Jan 15, 2015

Conversation

DanielRosenwasser
Copy link
Member

Addresses #1540 and #1541.

@DanielRosenwasser DanielRosenwasser force-pushed the unDestructuringParameterProperties branch from e2be011 to e19ebc6 Compare January 15, 2015 00:19
@@ -10169,6 +10172,9 @@ module ts {
else if (node.kind === SyntaxKind.InterfaceDeclaration && flags & NodeFlags.Ambient) {
return grammarErrorOnNode(lastDeclare, Diagnostics.A_declare_modifier_cannot_be_used_with_an_interface_declaration, "declare");
}
else if (node.kind === SyntaxKind.Parameter && (flags & NodeFlags.AccessibilityModifier) && isBindingPattern((<ParameterDeclaration>node).name)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

How can node.kind be Parameter if node is a SignatureDeclaration?

Copy link
Member Author

Choose a reason for hiding this comment

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

To clarify, it's not, GitHub diffs break after 10K lines.

@JsonFreeman
Copy link
Contributor

👍

1 similar comment
@yuit
Copy link
Contributor

yuit commented Jan 15, 2015

👍

DanielRosenwasser added a commit that referenced this pull request Jan 15, 2015
…rties

Disallow destructured parameter properties
@DanielRosenwasser DanielRosenwasser merged commit 8dd81ea into master Jan 15, 2015
@DanielRosenwasser DanielRosenwasser deleted the unDestructuringParameterProperties branch January 15, 2015 21:39
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 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