2019-01-30 01:46:20 +01:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
|
|
|
|
////function foo(this: void, /*a*/t: string, s: string/*b*/) {
|
2019-02-16 00:36:11 +01:00
|
|
|
//// return s;
|
2019-01-30 01:46:20 +01:00
|
|
|
////}
|
|
|
|
////foo("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-01-30 01:46:20 +01:00
|
|
|
newContent: `function foo(this: void, { t, s }: { t: string; s: string; }) {
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
foo({ t: "a", s: "b" });`
|
|
|
|
});
|