awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·

Type constraints

Ranking updated Jul 31, 2026

For type constraints, the strongest matches are samuelcolvin/pydantic (Pydantic is a runtime data validation and parsing library), sindresorhus/ow (This library provides runtime type checking and schema validation) and gvergnaud/hotscript (Hotscript is a type-level programming library for TypeScript that). colinhacks/zod and facebook/prop-types round out the shortlist. Each is ranked by relevance to your query, popularity and recent activity.

Compare the top open-source type constraint libraries on GitHub, ranked by stars and activity, and find the best fit.

Type constraints

Find the best repos with AI.We'll search the best matching repositories with AI.
  • samuelcolvin/pydanticsamuelcolvin avatar

    samuelcolvin/pydantic

    28,043View on GitHub↗

    Pydantic is a data validation library and parsing framework for Python. It functions as a type-based schema validator that uses standard Python type annotations to ensure input data conforms to predefined structural schemas. The project provides capabilities for parsing raw data into typed objects through automatic type conversion and validation. This includes the serialization of data and the validation of data structures to enforce correctness. The framework covers several application areas, including the verification of API requests and the management of application configurations. It all

    Pydantic is a runtime data validation and parsing library that uses Python type annotations to enforce structural schemas, fitting the type system utility category despite leaning more toward data validation than advanced type-level programming.

    PythonRuntime Type GuardsData Validation LibrariesSchema-Based State Validation
    View on GitHub↗28,043
  • sindresorhus/owsindresorhus avatar

    sindresorhus/ow

    3,868View on 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

    This library provides runtime type checking and schema validation for TypeScript, bridging runtime data integrity with static type narrowing, though it omits advanced type-level programming and compile-time contract enforcement.

    TypeScriptRuntime Type GuardsRuntime ValidationRuntime Validation Libraries
    View on GitHub↗3,868
  • gvergnaud/hotscriptgvergnaud avatar

    gvergnaud/hotscript

    3,669View on GitHub↗

    Hotscript is a comprehensive suite of composable utilities designed for performing structural transformations and mathematical operations within the TypeScript type system. It serves as a type-level manipulation library that provides a set of higher-order functions to map, filter, and reduce the structure of type definitions. The project focuses on type-level programming by implementing reusable logic and calculations directly within types. This includes the ability to create custom type functions, implement type-level pattern matching, and compose sequences of transformations where each oper

    Hotscript is a type-level programming library for TypeScript that provides composable utilities for structural type transformations and custom type functions, fulfilling the type-level programming and generic manipulation requirements.

    TypeScriptType-Level Programming UtilitiesType-Level Arithmetic
    View on GitHub↗3,669
  • colinhacks/zodcolinhacks avatar

    colinhacks/zod

    43,036View on 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 schema declaration and validation library that provides runtime type checking and automatically infers static types, making it a strong fit for type validation even though it focuses less on deep type-level programming.

    TypeScriptRuntime Type GuardsData Validation Libraries
    View on GitHub↗43,036
  • facebook/prop-typesfacebook avatar

    facebook/prop-types

    4,452View on GitHub↗

    prop-types is a JavaScript object validator and runtime type checker. It serves as a development tool for verifying that object properties match predefined specifications, primarily used to ensure that data passed into React components aligns with expected types. The utility detects data inconsistencies by logging warnings to the console when mismatches occur, rather than throwing exceptions. It employs a stateful warning cache to prevent duplicate logs and restricts validation logic to non-production environments to avoid performance overhead in released builds. The project covers data vali

    This library provides runtime type checking and object prop validation for JavaScript, though it lacks compile-time validation, generics, and type-level programming.

    JavaScriptRuntime Type Checking
    View on GitHub↗4,452
  • ronami/meta-typingronami avatar

    ronami/meta-typing

    1,576View on GitHub↗

    Meta-typing is a TypeScript metaprogramming toolkit that executes complex algorithms, mathematical operations, and data structure traversals entirely within compile-time type definitions. It functions as a type-level computation engine that evaluates numeric expressions, basic arithmetic, and aggregate calculations through recursive type evaluation and tuple-based data representations during the compilation phase. The library implements a comprehensive collection of advanced algorithms and data structures, including collection manipulation utilities for array slicing, filtering, merging, and

    This TypeScript metaprogramming toolkit executes complex algorithms and type-level computations entirely within compile-time type definitions, matching the requirements for type-level programming and compile-time validation.

    TypeScriptType-Level Computations
    View on GitHub↗1,576
  • microsoft/typescriptmicrosoft avatar

    microsoft/TypeScript

    109,271View on GitHub↗

    TypeScript is a language that extends standard syntax by adding a static type system. It identifies potential runtime errors by analyzing the behaviors and capabilities of values during the compilation process. The language supports object-oriented structures, including classes with inheritance and member visibility control, as well as flexible function definitions that utilize generics, overloads, and parameter destructuring. The project provides a compiler that manages the build lifecycle through a command-line interface, offering configurable options for module resolution, code generation,

    TypeScript is a foundational programming language and static analysis tool featuring comprehensive compile-time type checking, generics, and advanced type-level programming capabilities like conditional types.

    TypeScriptConditional TypesBuild Tools and AutomationCompilers and Interpreters
    View on GitHub↗109,271
  • ianstormtaylor/superstructianstormtaylor avatar

    ianstormtaylor/superstruct

    7,141View on 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 and JavaScript schema validation library that performs runtime type checking and infers static types, matching the visitor's need for data validation though it focuses less on general type-level programming.

    TypeScriptRuntime ValidationSchema Validation
    View on GitHub↗7,141
  • ts-essentials/ts-essentialsts-essentials avatar

    ts-essentials/ts-essentials

    4,068View on GitHub↗

    ts-essentials is a comprehensive toolkit of utility types and libraries for TypeScript, providing advanced primitives for recursive structural transformations, runtime assertions, and type guards. It serves as a utility library for performing complex type-level programming to ensure stronger type safety and reduce boilerplate. The project distinguishes itself through a specialized set of tools for deep object manipulation, such as recursively applying read-only or optional modifiers across nested hierarchies. It also provides a dedicated set of strict type constraints to ensure data structure

    This TypeScript utility library provides advanced type-level programming primitives and runtime type guards, helping you enforce complex type constraints and structural transformations.

    TypeScriptGeneric Type ConstraintsType-Level Programming Utilities
    View on GitHub↗4,068
  • sindresorhus/type-festsindresorhus avatar

    sindresorhus/type-fest

    17,233View on GitHub↗

    type-fest is a library of reusable utility types for performing complex transformations and validations on objects, arrays, strings, and numeric ranges in TypeScript. It provides a collection of type definitions designed to handle advanced structural changes and constraints. The project distinguishes itself by offering specialized logic for string literal processing, such as casing transformations and pattern-based modifications, and type-level arithmetic for calculating numeric ranges and absolute values. It also includes utilities for enforcing deep immutability, ensuring union mutual exclu

    This TypeScript utility library provides extensive type-level programming capabilities and compile-time constraints, though it focuses purely on static type definitions rather than runtime schema validation.

    TypeScriptGeneric Constraint ValidationType-Level Arithmetic
    View on GitHub↗17,233
  • open-circle/valibotopen-circle avatar

    open-circle/valibot

    8,769View on GitHub↗

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

    Valibot is a modular schema validation library for TypeScript that provides runtime input checking and automatically infers static types, fitting the type constraint and validation utility category.

    TypeScriptRuntime Type GuardsSchema Validation
    View on GitHub↗8,769
  • millsp/ts-toolbeltmillsp avatar

    millsp/ts-toolbelt

    7,145View on GitHub↗

    ts-toolbelt is a collection of specialized utilities for manipulating and validating TypeScript types. It provides a toolkit for performing complex transformations on objects, unions, and functions to enforce strict data consistency at compile time. The library features dedicated transformers for function types, including utilities for currying, composition, and signature extraction. It also includes an object type manipulator for deep merging, patching, and reshaping complex structures. The capability surface extends to literal string processing, type-level arithmetic, and tuple operations.

    This repository is a comprehensive collection of advanced type manipulation utilities for TypeScript that enables complex type-level programming and compile-time constraints, though it focuses strictly on compile-time work rather than runtime schema validation.

    TypeScriptType-Level Arithmetic
    View on GitHub↗7,145
  • gcanti/io-tsgcanti avatar

    gcanti/io-ts

    6,813View on 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

    This library provides runtime type checking and schema validation through a composable codec system, matching the requested focus on type system utilities even though it does not cover compile-time type-level programming.

    TypeScriptRuntime Validation
    View on GitHub↗6,813
  • arktypeio/arktypearktypeio avatar

    arktypeio/arktype

    7,780View on GitHub↗

    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 runtime validation library and schema orchestrator that infers static types from runtime definitions, providing the type-level and runtime checks requested in this search.

    TypeScriptGeneric Type Constraints
    View on GitHub↗7,780
  • gcanti/fp-tsgcanti avatar

    gcanti/fp-ts

    11,523View on GitHub↗

    fp-ts is a TypeScript library that brings pure functional programming patterns to the language through algebraic data types, type class abstractions, and composable combinators. It provides foundational data types like Option for optional values, Either for typed error handling, and Task for lazy asynchronous computations, all designed to make invalid states unrepresentable and side effects explicit. The library is built on category theory concepts, offering type classes such as Functor, Applicative, Monad, Semigroup, and Monoid with lawful instances for common data structures. The library di

    This TypeScript library provides strong type system utilities and algebraic data types to enforce strict error handling and make invalid states unrepresentable, though it focuses on functional patterns rather than generic schema validation.

    TypeScriptPure Functional TypeScript AbstractionsAlgebraic Data Type ValidationsAlgebraic Data Types
    View on GitHub↗11,523
  • foonathan/type_safefoonathan avatar

    foonathan/type_safe

    1,641View on GitHub↗

    This library is a collection of zero-overhead C++ abstractions designed to replace primitive types with strict wrappers. By leveraging template metaprogramming, it enforces compile-time type safety and validates data integrity, ensuring that logic errors are caught during the build process rather than at runtime. The project distinguishes itself by providing a zero-cost abstraction layer that maps high-level type safety wrappers directly to machine instructions. It utilizes static type identity enforcement to treat logically distinct data as incompatible types, even when they share the same u

    This C++ library provides compile-time type safety and constraint validation through template metaprogramming, fitting the requested type system utility category despite its focus on primitive wrapping rather than general schema validation.

    C++Type SafetyCompile-Time Type ValidationStatic Type Identity Enforcers
    View on GitHub↗1,641
  • pydantic/pydanticpydantic avatar

    pydantic/pydantic

    26,932View on GitHub↗

    Pydantic is a data validation and serialization library that enforces schema constraints and performs type conversion on complex data structures. It utilizes standard Python type annotations to define data models, allowing developers to establish structured schemas that automatically enforce business rules and constraints without the need for custom domain-specific languages. The library distinguishes itself by transforming high-level model definitions into optimized code during initialization to minimize runtime overhead. It supports recursive validation for nested data structures and employ

    Pydantic is a data validation and schema-enforcement library that uses Python type annotations for runtime checks and serialization, though it does not cover full type-level programming or compile-time static analysis.

    PythonData Validation LibrariesType-Hint-Based Schema DefinitionsSchema-Driven Modeling Frameworks
    View on GitHub↗26,932
  • google/pytypegoogle avatar

    google/pytype

    5,037View on GitHub↗

    Pytype is a static code analysis tool and type inference engine for Python. It functions as a static type analyzer that detects type mismatches and verifies type annotations without requiring full manual hinting, while also serving as a type stub generator for producing standalone definition files. The project distinguishes itself by automatically determining variable and function types through an analysis of code patterns and assignments. This inference engine allows for structural code verification and the generation of type stubs that describe the interfaces of modules and functions. The

    Pytype is a static code analyzer and type inference engine for Python that checks type constraints and verifies annotations at compile time, though it focuses less on runtime schema validation.

    PythonAutomatic Type InferencesType AnnotationsArgument Type Mismatch Detectors
    View on GitHub↗5,037
  • facebook/flowfacebook avatar

    facebook/flow

    22,232View on GitHub↗

    Flow is a JavaScript static type checker and AST parser that identifies type errors and prevents runtime failures through static annotations. It functions as a code intelligence engine and a static analysis linter to identify unsafe coding patterns and enforce consistency across a codebase. The project includes a type annotation stripper that removes static type signatures from source code, ensuring the resulting JavaScript is compatible with any runtime environment. It also provides a parser that converts typed JavaScript into an abstract syntax tree conforming to the ESTree specification.

    Flow provides static type checking and type system utilities for JavaScript, fulfilling the requirements for compile-time validation and type constraints even though it is focused on JavaScript rather than general type-level programming libraries.

    RustStatic Type CheckersCode IntelligenceCoding Standards Enforcement
    View on GitHub↗22,232
  • dry-rb/dry-typesdry-rb avatar

    dry-rb/dry-types

    899View on GitHub↗

    This library provides a type system for Ruby applications, offering a framework for defining, validating, and coercing data structures. It serves as a foundation for maintaining data integrity by ensuring that input values conform to established schemas and constraints before they are processed by application logic. The system distinguishes itself through a functional approach to data transformation and validation. It utilizes an immutable registry for type definitions and employs algebraic operators to compose complex, nested schemas from smaller, reusable components. By wrapping validation

    This library provides type definition, validation, and coercion for Ruby applications, offering robust schema composition and runtime checks despite missing compile-time generics.

    RubyData Validation LibrariesData Validation SchemasType System Libraries
    View on GitHub↗899
  • piotrwitek/utility-typespiotrwitek avatar

    piotrwitek/utility-types

    5,759View on GitHub↗

    This is a TypeScript utility type library providing advanced type aliases and mapped types for complex object and union transformations. It implements specialized tools for creating branded nominal types, extracting type metadata, and performing set operations on union types. The project distinguishes itself through a toolkit for recursive object transformations, allowing for the application of property constraints like read-only or optional status across deeply nested structures. It also provides a system for computing intersections, differences, and complements between union types to simula

    This TypeScript library provides advanced type-level programming utilities, mapped types, and compile-time type constraints for complex object and union transformations, though it lacks runtime schema validation features.

    TypeScriptRecursive Mapped TypesBranded TypesConditional Types
    View on GitHub↗5,759
  • python/typingpython avatar

    python/typing

    1,761View on GitHub↗

    Python static typing home. Hosts the documentation and a user help forum.

    This repository serves as the official home for Python's static typing documentation and discussions, fitting the search for a language feature and standard utility for type constraints.

    PythonCompatibility Layers
    View on GitHub↗1,761
  • antonagestam/phantom-typesantonagestam avatar

    antonagestam/phantom-types

    234View on GitHub↗

    Phantom types for Python.

    This library provides phantom types for Python, enabling compile-time or static validation of type constraints through type checkers, though it lacks built-in schema validation.

    PythonType Extensions
    View on GitHub↗234
  • phpstan/phpstanphpstan avatar

    phpstan/phpstan

    13,999View on GitHub↗

    This project is a static analysis engine and type checker designed for PHP codebases. It evaluates source code structure and type annotations to identify potential bugs, type mismatches, and logic errors without executing the application. By parsing code into an abstract syntax tree and applying a rule-based validation framework, it enforces code quality and safety standards across a project. What distinguishes this tool is its sophisticated type inference engine, which models dynamic language features, magic methods, and conditional types to maintain accuracy even in unconventional code. It

    This static analysis engine evaluates type annotations and enforces type constraints at compile-time for PHP codebases, serving as a robust type system utility.

    PHPStatic AnalysisStatic Analysis EnginesFramework Integration
    View on GitHub↗13,999
  • clojure/core.typedclojure avatar

    clojure/core.typed

    1,313View on GitHub↗

    An optional type system for Clojure

    This repository provides an optional type system for Clojure that brings static type checking and type-level annotations to the language, fitting the requested type constraint utility category even though it is tailored specifically to the Clojure ecosystem.

    ClojureType Systems
    View on GitHub↗1,313
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
samuelcolvin/pydantic28KPythonMITJun 16, 2026
sindresorhus/ow3.9KTypeScriptMITOct 16, 2025
gvergnaud/hotscript3.7KTypeScriptMITDec 28, 2024
colinhacks/zod43KTypeScriptMITJun 13, 2026
facebook/prop-types4.5KJavaScriptMITMay 17, 2024
ronami/meta-typing1.6KTypeScriptMITDec 5, 2022
microsoft/typescript109.3KTypeScriptApache-2.0Jun 12, 2026
ianstormtaylor/superstruct7.1KTypeScriptMITOct 1, 2024
ts-essentials/ts-essentials4.1KTypeScriptMITJun 3, 2026
sindresorhus/type-fest17.2KTypeScriptCC0-1.0Jun 22, 2026

Related searches

  • Concurrency control libraries
  • Memoization constraints
  • Data validation constraints
  • Data structure library
  • Type inference utilities
  • String type implementations
  • Generic interface libraries
  • Kubernetes operators