DEV Community

Cover image for A new take on TypeScript validation
Benito Johannes Kepler
Benito Johannes Kepler

Posted on

A new take on TypeScript validation

I’ve been building a TypeScript validation library for the past few months , just shipped v1.0.
Main idea: composition over inheritance.
pipe(string(), email()) instead of string().email() — fully tree-shakeable (≈0.8kb for a basic schema).

Key features:
JIT compiler (~2× faster on hot paths)
structured errors { code, path, meta } (i18n-friendly)
two-pass async validation (no wasted calls)
built-in React hooks

Modular: install only what you need (@loydjs/*).

Docs: loyddev-psi.vercel.app
npm: npmjs.com/package/@loydjs/schema
GitHub: github.com/b3nito404/loyd

Feedback welcome.

typescript #webdev #opensource

Top comments (0)