All chapters · TypeScript
- 02Make combinations that must never exist impossible to write
A rule that depends on people paying attention falls apart the moment something that can't pay attention writes the code.
- 03Don't use spread for state transitions
Types stop you from writing what shouldn't be there. They don't stop you from dragging along what already was.