TypeScript/tests/cases/fourslash/refactorConvertParamsToDestructuredObject_arrowFunction.ts

13 lines
460 B
TypeScript
Raw Normal View History

/// <reference path='fourslash.ts' />
2019-01-30 01:45:52 +01:00
////const foo = /*a*/(a: number, b: number)/*b*/ => { };
////foo(1, 2);
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-01-30 01:45:52 +01:00
newContent: `const foo = ({ a, b }: { a: number; b: number; }) => { };
foo({ a: 1, b: 2 });`
});