TypeScript/tests/cases/fourslash/moveToNewFile_getter.ts
Andrew Branch b834096998
Fix emit/formatting issues in refactors (#39506)
* Fix #37948

* Fix formatter skipping tab/space fixup on comments, handle trailing commas in list closing line count.

Fixes #37944

* Add newline between imports and main body of new file in moveToNewFile

Fixes #37941

* Update baseline (probably broken before?)
2020-07-22 10:31:42 -07:00

36 lines
541 B
TypeScript

/// <reference path='fourslash.ts' />
// @Filename: /a.ts
////class C {
//// get g() { return 0; }
//// get h() { return 1; }
////}
////[|export const { g, h: i } = new C();|]
// @Filename: /b.ts
////import { g, i } from "./a";
verify.noErrors();
verify.moveToNewFile({
newFileContents: {
"/a.ts":
`export class C {
get g() { return 0; }
get h() { return 1; }
}
`,
"/g.ts":
`import { C } from "./a";
export const { g, h: i } = new C();
`,
"/b.ts":
`
import { g, i } from "./g";
`,
},
});