-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow qualified name for convert namespace import (#41592)
- Loading branch information
Showing
2 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/cases/fourslash/refactorConvertImport_namespaceToNamedWithTypes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
/////*a*/import * as m from "m";/*b*/ | ||
////declare const a: m.aa; | ||
////declare const b: m.b; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Convert import", | ||
actionName: "Convert namespace import to named imports", | ||
actionDescription: "Convert namespace import to named imports", | ||
newContent: | ||
`import { aa, b as b_1 } from "m"; | ||
declare const a: aa; | ||
declare const b: b_1;`, | ||
}); |