TypeScript Exhaustiveness Checking

Exhaustiveness checking is a good feature when you use switch block. Assume that you need to check a value of variable which data type is union type as shown below screenshot. Shape is a discriminated union which consists of three types named Circle, Square and Triangle. kind field is shared in Circle, Square and Triangle … Continue reading TypeScript Exhaustiveness Checking