79204281

Date: 2024-11-19 16:34:57
Score: 1.5
Natty:
Report link

Because it's still wrong. As @knittl noted, if someone does something unsound or if, as you mentioned, you add new cases, the case will be wrong. From a typing perspective, false is not assignable to void, void is nothing, and false is a boolean, not a subtype of nothing. You can't pass something to nothing. If you want to ensure you handle all possible cases, consider adding logging (or don't) or enabling typescript-eslint/switch-exhaustiveness-check.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @knittl
  • Low reputation (1):
Posted by: Eli