Entity instance with validated props, attached methods, and immutable update helpers. Method returns that are typed as the base instance (self or self.with(...)) are mapped to the full instance type so chaining keeps the entity's methods.
self
self.with(...)
Convert the entity to a plain JSON object for persistence.
Create a new validated entity instance with patched properties.
Entity instance with validated props, attached methods, and immutable update helpers. Method returns that are typed as the base instance (
selforself.with(...)) are mapped to the full instance type so chaining keeps the entity's methods.