typescript-tuple is a type-only utility library providing a rich set of generics for manipulating tuple types in TypeScript. The current stable version is 5.0.1. It offers various type-level operations, mimicking common array methods like `Append`, `Prepend`, `Reverse`, `Concat`, `Slice`, `Drop`, and `FillTuple`, but applied to static tuple types. This allows developers to enforce strict type safety and leverage advanced type inference when working with fixed-length or variable-length tuple structures, catching potential type mismatches at compile time rather than runtime. The library differentiates itself by focusing exclusively on type transformations, offering a comprehensive suite for tuple manipulation within TypeScript's type system itself, making it a powerful tool for complex type definitions and functional type programming.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This library consists solely of type declarations; there are no runtime values to import. CommonJS `require` will result in an empty object or a TypeScript error.
All utilities are named exports. There is no default export. Attempting a default import will result in a TypeScript error.
For explicit type-only imports in TypeScript 3.8+, using `import type` is preferred for clarity and ensures no runtime code is inadvertently bundled, though a regular `import` statement works for type declarations as well.
Demonstrates fundamental type-level tuple manipulations: appending an element, reversing a tuple's order, and concatenating two tuples, showing how the library provides powerful type-safety for array-like operations on fixed-length type structures.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.
No traffic data recorded yet.