Closed davidlehn closed 3 years ago
If you don't provide a default then destructuring fails and the code can't even check what is destructured. So on public APIs, it should be there (as a general practice) to avoid confusing errors.
@davidlehn, closing this issue -- you can reopen if there's something actionable that can be described to be done.
Looking at the coverage reports there are many uses of
f({value} = {})
or similar where a value is required for the code to work. Will those default paths ever be taken? If so error handling is needed, if not those default constructs can be removed.