6 repositorios
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.
Esta es una librería de tipos de utilidad de TypeScript que proporciona alias de tipo avanzados y tipos mapeados para transformaciones complejas de objetos y uniones. Implementa herramientas especializadas para crear tipos nominales marcados, extraer metadatos de tipo y realizar operaciones de conjuntos en tipos de unión. El proyecto destaca por un kit de herramientas para transformaciones de objetos recursivas, permitiendo la aplicación de restricciones de propiedad como estado de solo lectura u opcional a través de estructuras profundamente anidadas. También proporciona un sistema para calcular intersecciones, diferencias y complementos entre tipos de unión para simular la lógica de conjuntos matemática. La librería cubre una amplia gama de capacidades del sistema de tipos, incluyendo filtrado de propiedades de objeto, comparación de formas y la extracción de constructores de clases y tipos de resolución de promesas. Adicionalmente incluye utilidades para la validación de valores, como la detección de valores falsy o nullish y la identificación de tipos primitivos.
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.