Use when modeling a domain with the type system to make illegal states unrepresentable — discriminated unions, exhaustive matching, newtypes/branded types, and Result/Option error modeling in TypeScript and Rust.
Use when modeling a domain with the type system to make illegal states unrepresentable — discriminated unions, exhaustive matching, newtypes/branded types, and Result/Option error modeling in TypeScript and Rust.