I am a bit confused about missing properties.
I wrote a function notwork,which can accept either a foo or a bar property. But destructuring does not handle it nicely. I have to specify the missing props explicity (see works), but this seems weird.
Can I circumvent this and simplify the typing?
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.