14 lines
424 B
TypeScript
14 lines
424 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
//// const increment = /*x*/(/*y*/a: number): number => a + 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: `const increment = function(a: number): number {
|
|
return a + 1;
|
|
};`,
|
|
});
|