26 lines
531 B
TypeScript
26 lines
531 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
//// const foo = /*x*/f/*y*/unction() {
|
|
//// // secret
|
|
//// let a = 41;
|
|
//// /*
|
|
//// msg
|
|
//// */
|
|
//// return a + 1;
|
|
//// };
|
|
|
|
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 = () => {
|
|
// secret
|
|
let a = 41;
|
|
/*
|
|
msg
|
|
*/
|
|
return a + 1;
|
|
};`,
|
|
});
|