TypeScript/tests/cases/fourslash/moveToNewFile_defaultExport.ts
Andy 7271ec1240
Add 'move to new file' refactor (#23726)
* 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
2018-05-10 11:17:04 -07:00

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();`,
},
});