TypeScript/tests/cases/fourslash/refactorConvertArrowFunctionOrFunctionExpression_ToAnon_MapArgument.ts
BigAru dbd58599f4 do not provide refactoring when it contains this
because this behaves differently in arrow than in function
2019-01-22 05:42:01 +01:00

14 lines
392 B
TypeScript

/// <reference path='fourslash.ts' />
//// [9,8,7].map(/*x*/n/*y*/ => n + 418);
goTo.select("x", "y");
edit.applyRefactor({
refactorName: "Convert arrow function or function expression",
actionName: "Convert to anonymous function",
actionDescription: "Convert to anonymous function",
newContent: `[9,8,7].map(function(n) {
return n + 418;
});`,
});