2 ms·
They are passing "prefix", "ending", and "extraNames" in an object. It's just defined inline in the function and using destructuring so the function can access
by Izkata 1y ago
They are passing "prefix", "ending", and "extraNames" in an object. It's just defined inline in the function and using destructuring so the function can access the keys by name without having to put the object in a variable (and the default values are part of the object destructuring).
- Waterluvian 1y agoYeah but to have half-decent typings you then have to define the entire type, again, in the signature.