Skip to content

What is self-assert?

self-assert is a small TypeScript library that helps you model valid domain objects and assisting their creation through guided assistants.

It encourages expressing validation inside the domain model — not in external schemas, UI forms, or controllers. This results in software that is easier to evolve, test, and reason about.

Inspired by object-oriented design principles, the library promotes:

  • Encapsulation of rules inside your domain objects
  • Valid construction over defensive validation
  • Clarity and consistency across the system

WARNING

This site is still a work in progress.