TypeScript/tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionComments1.ts

15 lines
498 B
TypeScript
Raw Normal View History

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({
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;
}`
});