Can we do both destructuring: ({a, b}) => ( a + b ) and grab the arguments: (...args) => ( f({...args}) ), at the same time for arrow functions in ES6.
Looking for something like (...args = {a, b}) => ( a + b + f({...args}) ).
My curent solution is to do something like:
({a, b}) => {
const {...args} = {a, b}
return a + b + f({...args})
}
But it is redundant or (thanks to nnnnnn & Dmitry)
(args) => {
const {a, b} = args
return a + b + f({...args})
}
which is less redundant and definitely better but still not entirely satisfactory.