TS Ep 51: Type-Level State Machines
·515 words·3 mins
Use mapped types and generics to enforce finite state transitions in the compiler. A type-level state machine makes impossible states impossible to represent, eliminating entire classes of runtime bugs.
