2018-10-18 13:38:27 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2018-11-09 09:51:51 +01:00
|
|
|
//// function foo(lambda){}
|
|
|
|
//// foo(function /*x*/is/*y*/Even(n) {
|
|
|
|
//// return n % 2 === 0;
|
|
|
|
//// });
|
2018-10-18 13:38:27 +02:00
|
|
|
|
|
|
|
goTo.select("x", "y");
|
|
|
|
edit.applyRefactor({
|
|
|
|
refactorName: "Convert arrow function or function expression",
|
|
|
|
actionName: "Convert to arrow function",
|
|
|
|
actionDescription: "Convert to arrow function",
|
2018-11-09 09:51:51 +01:00
|
|
|
newContent: `function foo(lambda){}
|
|
|
|
foo((n) => n % 2 === 0);`,
|
2018-10-18 13:38:27 +02:00
|
|
|
});
|