invariants
A test that breaks when you rename a field is not a test. It is a copy of your code written twice. I kept seeing this. Every refactor broke something. Eve...
By using TypeScript's static type system, not only can we enforce (typically challenging things like) business rules and error states, but we can create a domain-specific language so well-defined that it becomes virtually impossible for any future code to be written that puts the system in an illegal state.
A test that breaks when you rename a field is not a test. It is a copy of your code written twice. I kept seeing this. Every refactor broke something. Eve...