TypeScript/tests/cases/fourslash/refactorConvertArrowFunctionOrFunctionExpression_ToNamed_Comment.ts
2018-10-31 14:27:36 +01:00

24 lines
508 B
TypeScript

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