Enforcing Domain Invariants: Ontologic Part 2
typescript
dev.to
This is the second article in the hands-on series about shaping a real-world problem into code using Ontologic. Each article focuses on one main idea and points to the library-examples repo so you can read, run, and change the code yourself. In this article we pick up the librarian's project from Part 1 and tackle the next thing that lives on paper: the Loan. Along the way we meet invariants rules that must hold true about an entity at all times, not just when a specific command runs. If you h