Skip to content

Commit e892692

Browse files
author
Andy Hanson
committed
Add array destructure tests
1 parent b2ca04b commit e892692

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/cases/fourslash/codeFixUnusedIdentifier_destructure_partlyUnused.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
//// const { x, y } = o;
1111
//// y;
1212
////}
13+
////{
14+
//// const [x, y] = o;
15+
//// x;
16+
////}
17+
////{
18+
//// const [x, y] = o;
19+
//// y;
20+
////}
1321

1422
verify.codeFixAll({
1523
fixId: "unusedIdentifier_delete",
@@ -22,5 +30,13 @@ verify.codeFixAll({
2230
{
2331
const { y } = o;
2432
y;
33+
}
34+
{
35+
const [x] = o;
36+
x;
37+
}
38+
{
39+
const [y] = o;
40+
y;
2541
}`,
2642
});

0 commit comments

Comments
 (0)