re: Exhaustive Type Checking with TypeScript! VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Exhaustiveness checking seems like the 'default' behavior for the above switch statements. Great article though.
 

Yes, but it’s more explicit. Even in C# (which doesn’t have exhaustiveness checking like TypeScript), the best practice is to throw an error in the default case that says “unexpected case”. The benefit of TS is that it can catch those unexpected cases at compile time too! :)

 
code of conduct - report abuse