2018-05-08 20:23:01 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
// @noUnusedLocals: true
|
|
|
|
|
|
|
|
////{
|
|
|
|
//// const { x, y } = o;
|
|
|
|
//// x;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const { x, y } = o;
|
|
|
|
//// y;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const { x, y, z } = o;
|
|
|
|
//// y;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const { x, y, z } = o;
|
|
|
|
//// x; z;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const [x, y] = o;
|
|
|
|
//// x;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const [x, y] = o;
|
|
|
|
//// y;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const [x, y, z] = o;
|
|
|
|
//// y;
|
|
|
|
////}
|
|
|
|
////{
|
|
|
|
//// const [x, y, z] = o;
|
|
|
|
//// x; z;
|
|
|
|
////}
|
|
|
|
|
|
|
|
|
|
|
|
verify.codeFixAll({
|
|
|
|
fixId: "unusedIdentifier_delete",
|
2020-06-30 20:44:47 +02:00
|
|
|
fixAllDescription: ts.Diagnostics.Delete_all_unused_declarations.message,
|
2018-05-08 20:23:01 +02:00
|
|
|
newFileContent:
|
|
|
|
`{
|
|
|
|
const { x } = o;
|
|
|
|
x;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const { y } = o;
|
|
|
|
y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const { y } = o;
|
|
|
|
y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const { x, z } = o;
|
|
|
|
x; z;
|
|
|
|
}
|
|
|
|
{
|
2018-06-08 19:39:01 +02:00
|
|
|
const [x] = o;
|
2018-05-08 20:23:01 +02:00
|
|
|
x;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const [, y] = o;
|
|
|
|
y;
|
|
|
|
}
|
|
|
|
{
|
2018-06-08 19:39:01 +02:00
|
|
|
const [, y] = o;
|
2018-05-08 20:23:01 +02:00
|
|
|
y;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
const [x,, z] = o;
|
|
|
|
x; z;
|
|
|
|
}`,
|
|
|
|
});
|