8 Repos
Utilities for manipulating and aggregating properties across union types.
Distinct from Union Types: Candidates focus on GraphQL unions or runtime validation, not type-level aggregation of keys.
Explore 8 awesome GitHub repositories matching programming languages & runtimes · Union Type Transformations. Refine with filters or upvote what's useful.
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
Creates a single object type containing every possible key found across a union of object types.
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
Extracts or excludes specific members from a union type based on matching criteria.
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.
Filters, excludes, or extracts members from a union type based on a specific condition.
collect.js is a dependency-free JavaScript library that provides a fluent, chainable interface for manipulating arrays and objects. It mirrors the Laravel Collection API, offering a consistent set of methods for data transformation across JavaScript and Laravel backend environments. The library stores collection data as plain arrays internally and supports fluent method chaining, where each method returns a new collection instance. The library distinguishes itself by closely replicating the Laravel Collection API in JavaScript, mapping each PHP method to an equivalent JavaScript implementatio
Provides a flatMap operation that maps and flattens nested arrays into a single sequence.
Dies ist eine TypeScript-Utility-Typ-Bibliothek, die fortgeschrittene Typ-Aliase und Mapped Types für komplexe Objekt- und Union-Transformationen bereitstellt. Sie implementiert spezialisierte Tools für die Erstellung gebrandeter nominaler Typen, das Extrahieren von Typ-Metadaten und die Durchführung von Mengenoperationen auf Union-Typen. Das Projekt zeichnet sich durch ein Toolkit für rekursive Objekttransformationen aus, das die Anwendung von Eigenschaftseinschränkungen wie Read-only- oder Optional-Status über tief verschachtelte Strukturen hinweg ermöglicht. Zudem bietet es ein System zur Berechnung von Schnittmengen, Differenzen und Komplementen zwischen Union-Typen, um mathematische Mengenlogik zu simulieren. Die Bibliothek deckt ein breites Spektrum an Typsystem-Funktionen ab, einschließlich Objekt-Eigenschaftsfilterung, Formvergleich sowie die Extraktion von Klassenkonstruktoren und Promise-Auflösungstypen. Sie enthält zusätzlich Dienstprogramme für die Wertvalidierung, wie z. B. das Erkennen von falsy oder nullish Werten und die Identifizierung primitiver Typen.
Provides utilities for manipulating, filtering, and aggregating properties across union types.
Octosql ist eine föderierte SQL-Query-Engine, ein Datentransformer und ein Streaming-SQL-Prozessor. Es ermöglicht die Ausführung einzelner SQL-Statements über mehrere heterogene Datenquellen hinweg – einschließlich verschiedener Datenbanktypen und Dateiformate –, um Ergebnisse zu einem einheitlichen Datensatz zusammenzuführen und zu transformieren. Das System zeichnet sich dadurch aus, dass es CSV-, JSONLines- und Parquet-Dateien als virtuelle Tabellen behandelt und eine Plugin-basierte Architektur nutzt, um die Konnektivität zu externen Speichersystemen zu erweitern. Es fungiert als Streaming-Prozessor für unendliche Datenströme und verwendet Watermarks, Retractions und Tumbling Windows, um die Konsistenz bei ungeordneten Ereignissen zu wahren. Zudem dient es als SQL-Datengenerator, der synthetische Datensätze und Record-Streams über tabellenwertige Funktionen erzeugen kann. Die Engine umfasst Funktionen für Cross-Source-Joins und Multi-Source-Analysen, die durch Source-Side Predicate Push-down optimiert werden, um den Datentransfer zu reduzieren. Sie verwaltet komplexe Daten über ein statisches Typsystem mit Union-Types und bietet Observability durch die Visualisierung von Query-Ausführungsplänen.
Employs a flexible type system to handle columns containing multiple possible types via assertions.
This project is a comprehensive guide and educational resource for the TypeScript language. It covers the fundamental principles of the language, including its structural type system, static type analysis, and the process of transpiling typed source files into JavaScript. The material details how to model complex data and reusable type logic using generics, conditional types, and mapped types. It also explains the use of declaration files to provide type safety for external JavaScript libraries and the integration of type checking into existing JavaScript projects via JSDoc annotations. The
Covers how conditional types distribute over unions to enable advanced type mapping.
ts-essentials ist ein umfassendes Toolkit mit Utility-Types und Bibliotheken für TypeScript, das erweiterte Primitive für rekursive strukturelle Transformationen, Laufzeit-Assertions und Type-Guards bereitstellt. Es dient als Utility-Bibliothek zur Durchführung komplexer Type-Level-Programmierung, um eine stärkere Typsicherheit zu gewährleisten und Boilerplate-Code zu reduzieren. Das Projekt zeichnet sich durch ein spezialisiertes Set an Tools für die tiefe Objektmanipulation aus, wie etwa das rekursive Anwenden von Read-only- oder Optional-Modifikatoren über verschachtelte Hierarchien hinweg. Zudem bietet es ein dediziertes Set an strikten Type-Constraints, um sicherzustellen, dass Datenstrukturen spezifisch den JSON-Spezifikationen entsprechen. Das Toolkit deckt ein breites Spektrum an Funktionen ab, einschließlich Typanalyse für die Metadatenextraktion, Union- und Tuple-Manipulation sowie Validierung der strukturellen Identität. Es enthält zudem Laufzeit-Verifizierungs-Utilities, um die Vollständigkeit von Cases in der bedingten Logik zu erzwingen und Typ-Constraints während der Ausführung zu validieren.
Transforms union types into intersection types to facilitate complex function signatures.