For Schema-Validierungsbibliothek für TypeScript, the strongest matches are ianstormtaylor/superstruct (Superstruct is a TypeScript-native schema validation library that provides), colinhacks/zod (Zod is a TypeScript-first schema validation library that provides) and arktypeio/arktype (Arktype is a TypeScript-first runtime validation library that synchronizes). fabian-hiller/valibot and sindresorhus/ow round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.
Typsichere Bibliotheken zum Definieren, Parsen und Validieren von Datenstrukturen in TypeScript- und JavaScript-Anwendungen.
Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions. The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures. Its capabilities cover the validatio
Superstruct is a TypeScript-native schema validation library that provides runtime validation with full type inference through its composable struct definitions, making it a comprehensive fit for this search.
Zod is a TypeScript-first schema declaration and validation library designed to ensure end-to-end data integrity. It functions as a runtime type guard, allowing developers to define complex data structures through a declarative, chainable syntax. By using these schema definitions, the library automatically derives static TypeScript types, eliminating the need for manual type duplication and ensuring that runtime data matches expected application contracts. The library distinguishes itself through functional schema composition, which enables the creation of hierarchical structures by nesting a
Zod is a TypeScript-first schema validation library that provides runtime validation and automatic type inference through a declarative API, directly fulfilling the request for defining and validating data schemas at runtime with type inference.
Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida
Arktype is a TypeScript-first runtime validation library that synchronizes TypeScript types with runtime schemas, supports branded types, custom error messages, and declarative definitions, making it a comprehensive choice for type-safe data validation with inference.
Valibot is a runtime schema validation library that matches the core purpose, but the sparse metadata here doesn't confirm the TypeScript-first design, type inference, or declarative patterns this search asks for.
ow is a type-safe schema validation library for TypeScript that verifies data integrity at runtime. It functions as a runtime validation framework and type guard utility, ensuring that JavaScript values match expected types and schemas before they are processed. The library synchronizes runtime data checks with static TypeScript type definitions, allowing users to extract type definitions directly from validation predicates. This integration enables type narrowing, where a successful validation result refines the variable type for safer usage in the code. The framework uses a chainable API t
ow validates runtime data against TypeScript-compatible predicates with type inference and custom error messages, making it a solid match for schema validation—though its focus on function arguments rather than generic data shapes and the absence of a dedicated parse-vs-validate pattern keep it from being the most comprehensive option.
io-ts is a TypeScript runtime validation library that provides a composable codec system for decoding and encoding data at the boundaries of an application. It defines data schemas using structural types, where the shape of data determines its validity rather than nominal names, and produces runtime type guards from those definitions for efficient validation checks. The library is built around bidirectional codec mappings that combine decoding, encoding, and type checking into single reusable units. It supports a composable decoder pipeline where small validation steps can be chained together
io-ts is a TypeScript runtime validation library that uses composable codecs to define and enforce data schemas at your application's boundaries, directly matching your need for a TypeScript-first library with runtime validation, type inference, and support for refined/branded types through its structural schema definitions.
Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution. The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It
Typia is a TypeScript compile-time code generator that turns TypeScript type annotations into optimized runtime validation, serialization, and schema functions, directly supporting runtime validation, type inference, declarative schema definition through types, custom error messages, branded/refined types via custom tags, and both validation and assertion patterns, making it a comprehensive fit for a TypeScript-first runtime schema validation library.
Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.
Valibot is a modular, type-safe TypeScript library for runtime schema validation and type inference, covering exactly the defining and validating data schemas at runtime that you need, with support for branded types and pipeline-based parsing.
Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def
Yup is a TypeScript-first schema validation library that lets you define data shapes declaratively and validate runtime values, with type inference from schemas, custom error messages, and robust coercion, making it a comprehensive match for this search.
Ajv is a high-performance data validation framework that compiles JSON schemas into optimized, standalone JavaScript functions. By transforming declarative schema definitions into executable code, it eliminates runtime interpretation overhead and provides a secure, efficient way to enforce data integrity across both browser and server environments. The library distinguishes itself through its focus on performance and type safety. It employs advanced compilation techniques, including abstract syntax tree optimization and function caching, to ensure rapid validation. Beyond standard checks, it
Ajv is a high-performance data validation library for JSON schemas, written in TypeScript with full runtime validation and declarative definitions, but it does not provide TypeScript type inference from schemas or a separate parse-versus-validate pattern the way a TypeScript-first schema library like Zod does.
class-validator is a TypeScript class validation library that uses decorators to define constraints and rules for object properties. It functions as a decorator-based schema validator that ensures data integrity and structural correctness through a combination of synchronous checks and promise-based asynchronous rules. The library provides a recursive validation system for checking complex data hierarchies, including nested classes and individual elements within collections. It includes an object property whitelist utility capable of stripping undocumented properties or blocking unknown field
class-validator is a decorator-based TypeScript library that validates data at runtime using class definitions, supporting declarative schemas and custom error messages; while it lacks branded types and the parse–validate pattern, it is a genuine schema validation library with type inference.
Joi is a JavaScript data validation library used to define schemas that validate, cast, and sanitize data objects. It functions as an object schema validator and parser, ensuring that input data matches specific types and formats before it is processed by an application. The library features a conditional validation engine capable of dynamic schema enforcement, where validation logic and dependencies change based on the values of other keys within an object. It also serves as a data casting and sanitization tool, transforming input values into target types and removing sensitive keys from the
Joi is a widely-used JavaScript schema validation library that provides runtime validation, type coercion, and conditional rules, and works with TypeScript through type definitions, but its JavaScript-first design and the absence of built-in branded/refined types make it a partial fit for a fully TypeScript-native runtime schema library.
| Repository | Stars | Sprache | Lizenz | Letzter Push |
|---|---|---|---|---|
| ianstormtaylor/superstruct | 7.1K | TypeScript | MIT | |
| colinhacks/zod | 43K | TypeScript | MIT | |
| arktypeio/arktype | 7.8K | TypeScript | MIT | |
| fabian-hiller/valibot | 0 | — | — | — |
| sindresorhus/ow | 3.9K | TypeScript | MIT | |
| gcanti/io-ts | 6.8K | TypeScript | MIT | |
| samchon/typia | 5.8K | Go | MIT | |
| open-circle/valibot | 8.8K | TypeScript | MIT | |
| jquense/yup | 23.7K | TypeScript | MIT | |
| ajv-validator/ajv | 14.7K | TypeScript | MIT |