I know I can capture the rest of the parameters while destructing function parameters:
const f1 = ({ a, b, ...p }) => ...
f1({ a: 1, b: 2, c: 3, d: 4 })
then p contains c and d, but not a or b.
Is there a syntax that makes p contain all of a, b, c and d while at the same time, destructing a and b?
This is useful if inside f1 I need to call f2 with all the parameters.