2018-10-18 13:38:27 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2018-11-09 09:51:51 +01:00
|
|
|
//// let isFoo = /*x*/(/*y*/n: number): boolean => n === 42;
|
2018-10-18 13:38:27 +02:00
|
|
|
|
|
|
|
goTo.select("x", "y");
|
|
|
|
edit.applyRefactor({
|
|
|
|
refactorName: "Convert arrow function or function expression",
|
|
|
|
actionName: "Convert to named function",
|
|
|
|
actionDescription: "Convert to named function",
|
2018-11-09 09:51:51 +01:00
|
|
|
newContent: `function isFoo(n: number): boolean {
|
|
|
|
return n === 42;
|
2018-10-18 13:38:27 +02:00
|
|
|
}`,
|
|
|
|
});
|