TypeScript
npm i ivoA user-story-focused, event-driven data validation framework for TypeScript and Rust.
npm i ivo
import { Schema } from "ivo";
type User = { username: string; bio: string };
const UserModel = new Schema<User>((b) =>
b
.field(
b
.required("username")
.validate((v) => typeof v === "string" && v.length >= 3),
)
.field(b.lax("bio", "")),
).getModel();
await UserModel.create({ username: "ada" });
await UserModel.create({});
{ data: { username: "ada", bio: "" }, error: null }
{
data: null,
error: {
username: { reason: "'username' is required", metadata: null },
},
}
Enforce complex, multi-field invariants that keep a domain entity from ever entering an invalid state - not just isolated per-field checks.
Subscribe to creation, update and deletion lifecycles at both the entity and individual field level with onSuccess, onFailure and onDelete handlers.
The same constant, dependent, lax, required and virtual field concepts apply in both implementations, so switching languages doesn't mean relearning the mental model.
Median time per operation
Measured on an Apple M4: TypeScript (Bun 1.4.4, 2026-11-12), Rust (rustc 1.99.1, 2026-10-18).
npm i ivocargo add ivo