6 dépôts
Techniques for distinguishing between identical structures by assigning unique labels or flavors to types.
Distinct from Schema-Driven Type Inference: Distinct from Schema-Driven Type Inference: focuses specifically on the 'branding' of types to prevent mixing identical structures, not the general inference process.
Explore 6 awesome GitHub repositories matching software engineering & architecture · Branded Types. Refine with filters or upvote what's useful.
Reason is a strongly typed functional language and multi-target compiler designed to produce either JavaScript for web environments or native machine code for operating systems. It serves as an OCaml-compatible language that shares an abstract syntax tree with OCaml, providing a practical syntax for the OCaml ecosystem. The project functions as a type-safe frontend language, incorporating JSX support to build user interfaces through structural elements that translate into type-safe function calls. It enables deep integration with the JavaScript ecosystem, allowing the use of existing librarie
Implements a nominal type system that distinguishes records by their name rather than their structure.
Valibot is a modular, type-safe schema library for validating and parsing structural data in TypeScript environments.
Assigns unique flavors to schema outputs to prevent the accidental mixing of identical data structures.
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
Attaches unique type-level symbols to validated data to distinguish verified values from raw inputs at compile time.
Provides nominal type distinction preventing substitution of structurally identical types.
Il s'agit d'une bibliothèque de types utilitaires TypeScript fournissant des alias de type avancés et des types mappés pour des transformations complexes d'objets et d'unions. Elle implémente des outils spécialisés pour créer des types nominaux marqués, extraire des métadonnées de type et effectuer des opérations d'ensemble sur des types d'union. Le projet se distingue par une boîte à outils pour les transformations d'objets récursives, permettant l'application de contraintes de propriété comme le statut en lecture seule ou optionnel à travers des structures profondément imbriquées. Il fournit également un système pour calculer les intersections, les différences et les compléments entre les types d'union pour simuler la logique d'ensemble mathématique. La bibliothèque couvre un large éventail de fonctionnalités du système de types, y compris le filtrage des propriétés d'objet, la comparaison de formes et l'extraction de constructeurs de classe et de types de résolution de promesse. Elle inclut en outre des utilitaires pour la validation de valeur, tels que la détection de valeurs falsy ou nullish et l'identification de types primitifs.
Implements branded types to distinguish between identical object structures using unique labels.
Ziggy is a frontend routing bridge that exports server route definitions to JavaScript or JSON for use in browser-based applications. It acts as a named route resolver, synchronizing server-defined routes with the client to generate full URLs from named routes without hardcoding paths. The project includes a TypeScript route generator that creates type definitions for backend routes, providing static type checking and autocompletion. It also provides dedicated integration hooks and plugins for React and Vue to make routing capabilities available within component-based frameworks. Beyond URL
Implements branded types in TypeScript to restrict route names to a predefined set of valid identifiers.