-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(60505): Convert to namespace import refactoring should drop file …
…extensions on namespace name (#60510)
- Loading branch information
1 parent
b3c67d3
commit d6b7c41
Showing
2 changed files
with
19 additions
and
1 deletion.
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
18 changes: 18 additions & 0 deletions
18
tests/cases/fourslash/refactorConvertImport_namedToNamespace11.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,18 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// @allowJs: true | ||
// @checkJs: true | ||
|
||
// @filename: /a.js | ||
/////*a*/import { a } from "./foo.js";/*b*/ | ||
////a; | ||
|
||
goTo.select("a", "b"); | ||
edit.applyRefactor({ | ||
refactorName: "Convert import", | ||
actionName: "Convert named imports to namespace import", | ||
actionDescription: "Convert named imports to namespace import", | ||
newContent: | ||
`import * as foo from "./foo.js"; | ||
foo.a;`, | ||
}); |