4 ms·
I'll bite: why the anonymous function throwing an Error in the first snippet?
by mdaniel 4y ago
I'll bite: why the anonymous function throwing an Error in the first snippet?
- aastronaut 4y agoI didn't lay out a bait =) It would also look more readable to me with a default return value. An exhaustiveness check just keeps your mapping functionally pure and the type checker can catch it.