awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

TypeScript 运行时类型验证库

排名更新于 2026年6月30日

For TypeScript 运行时类型验证库, the strongest matches are colinhacks/zod (Zod is a TypeScript-first schema declaration and validation library), ianstormtaylor/superstruct (Superstruct is a TypeScript-first runtime validation library that infers) and jquense/yup (Yup is a widely-used schema validation library with first-class). open-circle/valibot and yiminghe/async-validator round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

这些库为 TypeScript 应用中的运行时数据提供了基于模式的验证和类型安全解析。

TypeScript 运行时类型验证库

用 AI 发现最棒的仓库。我们将通过 AI 为您搜索最匹配的仓库。
  • colinhacks/zodcolinhacks 的头像

    colinhacks/zod

    43,036在 GitHub 上查看↗

    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 declaration and validation library that automatically infers static types from runtime definitions, supports custom validators, async validation, unions, discriminated unions, and recursive schemas — fitting every requirement for a runtime type validation library with first-class TypeScript inference.

    TypeScriptData Validation SchemasRecursive Data SchemasValidation Error Formatters
    在 GitHub 上查看↗43,036
  • ianstormtaylor/superstructianstormtaylor 的头像

    ianstormtaylor/superstruct

    7,141在 GitHub 上查看↗

    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-first runtime validation library that infers static types from composable schemas, supports custom and async validators, unions, recursive definitions, and detailed error reporting—covering all the requested features.

    TypeScriptCustom ValidatorsSchema ValidationRecursive Validation Engines
    在 GitHub 上查看↗7,141
  • jquense/yupjquense 的头像

    jquense/yup

    23,673在 GitHub 上查看↗

    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 widely-used schema validation library with first-class TypeScript support (it infers static types from runtime schemas), and it covers all the requested features including custom validators, async validation, unions via oneOf, and recursive schemas — making it an ideal fit for runtime data validation in TypeScript.

    TypeScriptData Validation SchemasRecursive Data SchemasSchema Validation
    在 GitHub 上查看↗23,673
  • open-circle/valibotopen-circle 的头像

    open-circle/valibot

    8,769在 GitHub 上查看↗

    Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.

    Valibot is a modular, TypeScript-first schema validation library that provides runtime validation, automatic type inference, and a pipeline-based transformation system, making it an excellent fit for your need for type-safe data structure validation.

    TypeScriptData Validation SchemasDiscriminated UnionsRecursive Data Schemas
    在 GitHub 上查看↗8,769
  • yiminghe/async-validatoryiminghe 的头像

    yiminghe/async-validator

    9,099在 GitHub 上查看↗

    async-validator is a JavaScript schema validation library and asynchronous data validation engine. It verifies complex object structures and nested arrays by applying recursive rules and non-blocking, promise-based execution to ensure data integrity. The library functions as both an object constraint validator and a data transformation pipeline. It allows for the sanitization, coercion, and formatting of input values through a sequence of functions that run before and after the primary validation process. The engine covers a range of capabilities including recursive nested validation, the en

    async-validator is a schema-based validation library with async and custom rules, but it does not natively infer TypeScript types from schemas, which is a key requirement for your search.

    TypeScriptData Validation SchemasAsynchronous Validation
    在 GitHub 上查看↗9,099
  • sinclairzx81/typeboxsinclairzx81 的头像

    sinclairzx81/typebox

    6,759在 GitHub 上查看↗

    TypeBox is a JSON schema generator and TypeScript data validator. It functions as a type builder that creates compliant JSON schema definitions while providing a mechanism for synchronizing runtime validation logic with compile-time types. The project allows for the automatic derivation of static TypeScript interfaces from schema definitions to eliminate redundant type declarations. It converts complex type constructs into schema fragments and resolves static types to maintain consistency between data shapes and code. The system covers runtime type checking and data validation through the us

    TypeBox is a TypeScript-first runtime validation library that auto-derives static types from JSON schema definitions, providing full type inference, schema composition, custom validators, and support for unions and recursion — exactly what this search requires.

    TypeScriptJSON Schema GeneratorsData Schema ValidationData Type Validation
    在 GitHub 上查看↗6,759
  • typestack/class-validatortypestack 的头像

    typestack/class-validator

    11,796在 GitHub 上查看↗

    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 TypeScript library that validates object properties via decorators, with support for async, custom, and recursive validation, making it fit for runtime data structure validation, though its class-based approach differs from schema-driven type inference.

    TypeScriptAsynchronous Validation
    在 GitHub 上查看↗11,796
  • gcanti/io-tsgcanti 的头像

    gcanti/io-ts

    6,813在 GitHub 上查看↗

    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 and produces type guards, fitting the request for a validation library, though the provided description does not explicitly confirm async or union support.

    TypeScriptData Validation Schemas
    在 GitHub 上查看↗6,813
  • samchon/typiasamchon 的头像

    samchon/typia

    5,837在 GitHub 上查看↗

    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 validation library that generates runtime validation functions directly from your existing TypeScript type annotations, giving you type inference and schema definitions without separate schema files – exactly the kind of tool this search targets, though its compile-time approach is a distinct trade-off compared to runtime-schema libraries.

    GoCompile-Time Code GenerationTypeScript Type-to-Code GeneratorsAPI Client SDK Generators
    在 GitHub 上查看↗5,837
  • sindresorhus/owsindresorhus 的头像

    sindresorhus/ow

    3,868在 GitHub 上查看↗

    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 provides runtime validation for function arguments and objects with a fluent API and TypeScript support, which places it squarely in the runtime type validation category, though it focuses specifically on argument validation rather than full schema-based data structure validation, so it covers only some of the requested features like custom validators and error handling.

    TypeScriptRuntime Schema ValidationsChainable Validation APIsData Schema Enforcement
    在 GitHub 上查看↗3,868
一览前 10 名对比
仓库Star 数语言许可证最后推送
colinhacks/zod43KTypeScriptMIT2026年6月13日
ianstormtaylor/superstruct7.1KTypeScriptMIT2024年10月1日
jquense/yup23.7KTypeScriptMIT2026年6月12日
open-circle/valibot8.8KTypeScriptMIT2026年6月21日
yiminghe/async-validator9.1KTypeScriptMIT2024年2月20日
sinclairzx81/typebox6.8KTypeScriptNOASSERTION2026年6月22日
typestack/class-validator11.8KTypeScriptMIT2026年3月25日
gcanti/io-ts6.8KTypeScriptMIT2024年12月10日
samchon/typia5.8KGoMIT2026年6月22日
sindresorhus/ow3.9KTypeScriptMIT2025年10月16日

Related searches

  • TypeScript 模式验证库
  • 基于 Python 类型提示的数据验证库
  • a lightweight validation library for JavaScript
  • 端到端类型安全的 TypeScript API 层
  • a data validation library for Go
  • React 表单验证库
  • a data validation library for Rust
  • TypeScript 面试学习资料