TypeScript/tests/cases/fourslash/refactorConvertArrowFunctionOrFunctionExpression_ToArrow_Single_If.ts

16 lines
397 B
TypeScript

/// <reference path='fourslash.ts' />
//// const foo = /*x*/f/*y*/unction() {
//// if (true) { }
//// };
goTo.select("x", "y");
edit.applyRefactor({
refactorName: "Convert arrow function or function expression",
actionName: "Convert to arrow function",
actionDescription: "Convert to arrow function",
newContent: `const foo = () => {
if (true) { }
};`,
});