TypeScript/tests/cases/fourslash/refactorConvertArrowFunctionOrFunctionExpression_ToAnon_FnArgument.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

16 lines
447 B
TypeScript

/// <reference path='fourslash.ts' />
//// function doSomething(a){}
//// doSomething(/*x*/(/*y*/) => 1 + 1);
goTo.select("x", "y");
edit.applyRefactor({
refactorName: "Convert arrow function or function expression",
actionName: "Convert to anonymous function",
actionDescription: "Convert to anonymous function",
newContent: `function doSomething(a){}
doSomething(function() {
return 1 + 1;
});`,
});