2018-10-18 13:38:27 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2018-11-09 09:51:51 +01:00
|
|
|
//// function doSomething(a){}
|
|
|
|
//// doSomething(/*x*/(/*y*/) => 1 + 1);
|
2018-10-18 13:38:27 +02:00
|
|
|
|
|
|
|
goTo.select("x", "y");
|
|
|
|
edit.applyRefactor({
|
|
|
|
refactorName: "Convert arrow function or function expression",
|
|
|
|
actionName: "Convert to anonymous function",
|
|
|
|
actionDescription: "Convert to anonymous function",
|
2018-11-09 09:51:51 +01:00
|
|
|
newContent: `function doSomething(a){}
|
|
|
|
doSomething(function() {
|
2019-01-22 05:42:01 +01:00
|
|
|
return 1 + 1;
|
|
|
|
});`,
|
2018-10-18 13:38:27 +02:00
|
|
|
});
|