43bf039a94
* Add refactor to convert namespace to named imports and back * Add tests and comments * Code review * Handle shorthand property assignment and re-export * Don't use forEachFreeIdentifier * Fix rename after "."
16 lines
383 B
TypeScript
16 lines
383 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @allowSyntheticDefaultImports: true
|
|
|
|
/////*a*/import * as m from "m";/*b*/
|
|
////m();
|
|
|
|
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 m from "m";
|
|
m();`,
|
|
});
|