-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Handle BindingElement in fixUnusedIdentifier #23819
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// @noUnusedLocals: true | ||
|
||
////{ | ||
//// const { x, y } = o; | ||
//// x; | ||
////} | ||
////{ | ||
//// const { x, y } = o; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That should be covered by #23805. |
||
//// y; | ||
////} | ||
|
||
verify.codeFixAll({ | ||
fixId: "unusedIdentifier_delete", | ||
fixAllDescription: "Delete all unused declarations", | ||
newFileContent: | ||
`{ | ||
const { x } = o; | ||
x; | ||
} | ||
{ | ||
const { y } = o; | ||
y; | ||
}`, | ||
}); |
There was a problem hiding this comment.
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: