Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Handle BindingElement in fixUnusedIdentifier#23819

Merged
2 commits merged into
mastermicrosoft/TypeScript:masterfrom
codeFixUnusedIdentifier_destructure_partlyUnusedmicrosoft/TypeScript:codeFixUnusedIdentifier_destructure_partlyUnusedCopy head branch name to clipboard
May 8, 2018
Merged

Handle BindingElement in fixUnusedIdentifier#23819
2 commits merged into
mastermicrosoft/TypeScript:masterfrom
codeFixUnusedIdentifier_destructure_partlyUnusedmicrosoft/TypeScript:codeFixUnusedIdentifier_destructure_partlyUnusedCopy head branch name to clipboard

Conversation

@ghost

@ghost ghost commented May 2, 2018

Copy link
Copy Markdown

Fixes half of #22330 -- other half fixed by #23805.

@ghost ghost requested a review from amcasey May 2, 2018 15:44
//// x;
////}
////{
//// const { x, y } = o;

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.

Would it be interesting to test the case where only one variable is declared and it is unused? Or is that covered by the other PR?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

That should be covered by #23805.

}
break;

case SyntaxKind.BindingElement:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ArrayBindingPatterens are positional, so not sure how that works with them.. can you add a test for:

var [x, y, z] = [0, 1, 2];
y;

@ghost ghost force-pushed the codeFixUnusedIdentifier_destructure_partlyUnused branch from e892692 to 8671615 Compare May 8, 2018 17:00
@ghost ghost force-pushed the codeFixUnusedIdentifier_destructure_partlyUnused branch from 8671615 to 2b47e15 Compare May 8, 2018 17:06
@ghost ghost merged commit ccfd3bf into master May 8, 2018
@ghost ghost deleted the codeFixUnusedIdentifier_destructure_partlyUnused branch May 8, 2018 18:23
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
This pull request was closed.
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.