TypeScript/tests/cases/fourslash/unusedVariableWithTrivia1.ts
Jesse Trinity ef377d5a66
Don't delete comments when deleting unused declarations (#37467)
* don't delete comment on variable declaration

* add more declaration kinds

* don't copy comment in convertes6 class

* don't copy comments in convertToES6Class

* add tests

* use isAnyImportSyntax

* handle mixed comment types

* update tests
2020-03-31 10:18:06 -07:00

21 lines
407 B
TypeScript

/// <reference path='fourslash.ts' />
// @noUnusedLocals: true
////[|namespace greeter {
//// // do not remove comment
//// let a = 0;
//// // comment
//// let b = 0;
//// b;
////}|]
verify.codeFix({
description: "Remove unused declaration for: 'a'",
newRangeContent: `namespace greeter {
// do not remove comment
// comment
let b = 0;
b;
}`
});