GeistHaus
log in · sign up

Make Illegal States Unrepresentable! - Domain-Driven Design w/ TypeScript | Khalil Stemmler

khalilstemmler.com

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.

1 page links to this URL
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...

0 inbound links article en