* Add 'move to new file' refactor * Code review, and support commonjs * Compute movedSymbols completely before using, and support `export import` * Fix assertion error: sort empty change before non-empty change * Remove extra newline * Add allowTextChangesInNewFiles preference * Add the new file to 'files' in tsconfig * Avoid parameter initializer * Update API baselines * Use path relative to tsconfig.json * Code review * Fix error where node in tsconfig file was missing a source file
25 lines
374 B
TypeScript
25 lines
374 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @Filename: /a.ts
|
|
////[|export default function f() { }|]
|
|
////f();
|
|
|
|
// @Filename: /user.ts
|
|
////import f from "./a";
|
|
////f();
|
|
|
|
verify.moveToNewFile({
|
|
newFileContents: {
|
|
"/a.ts":
|
|
`import f from "./f";
|
|
|
|
f();`,
|
|
|
|
"/f.ts":
|
|
`export default function f() { }`,
|
|
|
|
"/user.ts":
|
|
`import f from "./f";
|
|
f();`,
|
|
},
|
|
});
|