TypeScript/tests/cases/fourslash/refactorConvertParamsToDestructuredObject_functionComments2.ts

26 lines
600 B
TypeScript
Raw Normal View History

2019-02-11 21:03:09 +01:00
/// <reference path='fourslash.ts' />
////function /*a*/foo/*b*/(// comment
2019-02-16 00:36:11 +01:00
//// // a comment
//// a: number,
//// // b comment
//// b: number
////) {
//// return a + b;
////}
2019-02-11 21:03:09 +01:00
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-11 21:03:09 +01:00
newContent: `function foo(// comment
2019-02-16 00:36:11 +01:00
{ a, b }: {
// a comment
a: number;
// b comment
b: number;
}) {
return a + b;
}`
2019-02-11 21:03:09 +01:00
});