TypeScript/tests/cases/fourslash/extract-method10.ts
Andrew Casey 2ea4cfe23b Insert a line break before a function at EOF if needed
This is a pre-existing issue that became more obvious after refining
trivia handling.
2017-10-12 14:19:36 -07:00

20 lines
469 B
TypeScript

/// <reference path='fourslash.ts' />
//// export {}; // Make this a module
//// (x => x)(/*1*/x => x/*2*/)(1);
goTo.select('1', '2');
edit.applyRefactor({
refactorName: "Extract Symbol",
actionName: 'function_scope_0',
actionDescription: "Extract to function in module scope",
newContent:
`export {}; // Make this a module
(x => x)(/*RENAME*/newFunction())(1);
function newFunction(): (x: any) => any {
return x => x;
}
`
});