TypeScript 4.0 brings variadic tuple types and labeled tuples. Better type inference and DX.
Variadic Tuples
type Concat<T extends unknown[], U extends unknown[]> = [...T, ...U];
type Result = Concat<[1, 2], [3, 4]>; // [1, 2, 3, 4]Labeled Tuples
type Point = [x: number, y: number, z?: number];
// Better editor hintsReferences
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.