Runtime validators and serializers via transformation
Top 9.8% on sourcepulse
Typia is a TypeScript transformer library that generates highly optimized runtime validators and serializers directly from TypeScript types. It targets developers seeking to enforce type safety at runtime with minimal overhead, offering significant performance gains over traditional schema-based validation libraries.
How It Works
Typia leverages TypeScript's compiler API to transform type definitions into specialized runtime functions. For instance, typia.createIs<T>()
is compiled into a dedicated type-checking function tailored specifically for type T
. This approach eliminates the need for separate schema definitions, allowing developers to use pure TypeScript types for validation and serialization, resulting in faster execution and reduced boilerplate.
Quick Start & Requirements
npm install typia
Highlighted Details
class-validator
.class-transformer
.Maintenance & Community
nonara/ts-patch
and ryoppippi/unplugin-typia
as related projects.Licensing & Compatibility
Limitations & Caveats
1 day ago
Inactive