intermediate30 minby DevFox

Modelling Domains with Types

Making illegal states unrepresentable: replacing boolean flags with unions, encoding invariants in shapes, and letting the compiler enforce rules you were writing comments about.

  • TypeScript
  • Types