TypeScript
Sep 2026 6 min read
Typing Your Data So the Bad States Simply Can't Happen
Most TypeScript tutorials teach you to describe data you already have. The bigger win is using types to forbid data you never want — states that shouldn't exist, values that shouldn't combine. A practical tour of discriminated unions, `satisfies` & deriving types from the data instead of typing it twice.
Read more