2017-08-05 01:10:33 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2017-08-25 18:53:28 +02:00
|
|
|
//// export {}; // Make this a module
|
|
|
|
//// (x => x)(/*1*/x => x/*2*/)(1);
|
2017-08-05 01:10:33 +02:00
|
|
|
|
|
|
|
goTo.select('1', '2');
|
2017-08-25 18:53:28 +02:00
|
|
|
edit.applyRefactor({
|
2017-09-15 01:04:44 +02:00
|
|
|
refactorName: "Extract Symbol",
|
|
|
|
actionName: 'function_scope_0',
|
2017-09-09 14:52:52 +02:00
|
|
|
actionDescription: "Extract to function in module scope",
|
2017-09-13 18:02:10 +02:00
|
|
|
newContent:
|
|
|
|
`export {}; // Make this a module
|
|
|
|
(x => x)(/*RENAME*/newFunction())(1);
|
2017-10-12 20:37:31 +02:00
|
|
|
|
2017-09-13 18:02:10 +02:00
|
|
|
function newFunction(): (x: any) => any {
|
|
|
|
return x => x;
|
|
|
|
}
|
|
|
|
`
|
2017-08-25 18:53:28 +02:00
|
|
|
});
|