mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-08 22:29:37 -05:00
avoid removing comments when removing unused locals
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
// @noUnusedLocals: true
|
||||
//// [| namespace greeter {
|
||||
//// // some legit comments
|
||||
//// function function1() {
|
||||
//// }/*1*/
|
||||
//// } |]
|
||||
|
||||
verify.rangeAfterCodeFix(`namespace greeter {
|
||||
// some legit comments
|
||||
}`);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// @noUnusedLocals: true
|
||||
// @Filename: file2.ts
|
||||
////[| import {Calculator, test, test2} from "./file1" |]
|
||||
////[| import {Calculator, /*some comments*/ test, test2} from "./file1" |]
|
||||
|
||||
//// test();
|
||||
//// test2();
|
||||
@@ -20,5 +20,5 @@
|
||||
////
|
||||
//// }
|
||||
|
||||
verify.rangeAfterCodeFix(`import {test, test2} from "./file1"`);
|
||||
verify.rangeAfterCodeFix(`import {/*some comments*/ test, test2} from "./file1"`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user