2019-02-11 21:03:09 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
2019-02-16 00:36:11 +01:00
|
|
|
////function /*a*/foo/*b*/(a: number /** a */, b: number /** b */) {
|
2019-02-11 21:03:09 +01:00
|
|
|
//// return a + b;
|
|
|
|
////}
|
|
|
|
|
|
|
|
goTo.select("a", "b");
|
|
|
|
edit.applyRefactor({
|
2019-03-14 21:41:29 +01:00
|
|
|
refactorName: "Convert parameters to destructured object",
|
|
|
|
actionName: "Convert parameters to destructured object",
|
|
|
|
actionDescription: "Convert parameters to destructured object",
|
2019-02-16 00:36:11 +01:00
|
|
|
newContent: `function foo({ a, b }: { a: number /** a */; b: number /** b */; }) {
|
2019-02-11 21:03:09 +01:00
|
|
|
return a + b;
|
|
|
|
}`
|
|
|
|
});
|