8 个仓库
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.
这是一个 TypeScript 实用类型库,为复杂的对象和联合类型转换提供高级类型别名和映射类型。它实现了用于创建品牌化(branded)标称类型、提取类型元数据以及对联合类型执行集合操作的专用工具。 该项目通过一个用于递归对象转换的工具包脱颖而出,允许在深度嵌套的结构中应用只读或可选状态等属性约束。它还提供了一个用于计算联合类型之间的交集、差集和补集的系统,以模拟数学集合逻辑。 该库涵盖了广泛的类型系统功能,包括对象属性过滤、形状比较以及类构造函数和 Promise 解析类型的提取。它还包括用于值验证的实用程序,例如检测假值或空值以及识别原始类型。
Provides utilities for manipulating, filtering, and aggregating properties across union types.
Octosql 是一个联邦 SQL 查询引擎、数据转换器和流式 SQL 处理器。它允许用户跨多个异构数据源(包括不同类型的数据库和文件格式)执行单一 SQL 语句,从而合并并转换结果集。 该系统的独特之处在于将 CSV、JSONLines 和 Parquet 文件视为虚拟表,并利用基于插件的架构扩展对外部存储引擎的连接。它作为无限数据流的流式处理器,使用水印(watermarks)、撤回(retractions)和翻滚窗口(tumbling windows)来维持乱序事件的一致性。此外,它还可用作 SQL 数据生成器,通过表值函数生成合成数据集和记录流。 该引擎具备跨源数据连接和多源分析能力,并通过源端谓词下推(predicate push-down)进行优化,以减少数据传输。它通过包含联合类型的静态类型系统管理复杂数据,并提供查询执行计划可视化功能以增强可观测性。
Employs a flexible type system to handle columns containing multiple possible types via assertions.
该项目是 TypeScript 语言的综合指南和教育资源。它涵盖了该语言的基本原则,包括其结构化类型系统、静态类型分析以及将类型化源文件转译为 JavaScript 的过程。 该材料详细介绍了如何使用泛型、条件类型和映射类型来建模复杂数据和可重用的类型逻辑。它还解释了如何使用声明文件为外部 JavaScript 库提供类型安全,以及如何通过 JSDoc 注释将类型检查集成到现有的 JavaScript 项目中。 内容范围扩展到面向对象编程模式、DOM 操作和编译器行为配置。它包括关于管理模块互操作性、设置构建管线以及利用编辑器智能以提高开发者生产力的指导。
Covers how conditional types distribute over unions to enable advanced type mapping.
ts-essentials 是一个全面的 TypeScript 工具类型和库工具包,提供用于递归结构转换、运行时断言和类型保护的高级原语。它作为一个工具库,用于执行复杂的类型级编程,以确保更强的类型安全性并减少样板代码。 该项目通过一套专门用于深度对象操作的工具脱颖而出,例如在嵌套层次结构中递归应用只读或可选修饰符。它还提供了一套专门的严格类型约束,以确保数据结构专门符合 JSON 规范。 该工具包涵盖了广泛的功能,包括用于元数据提取的类型分析、联合和元组操作以及结构身份验证。它还包括运行时验证工具,以在条件逻辑中强制执行案例穷举并在执行期间验证类型约束。
Transforms union types into intersection types to facilitate complex function signatures.