type Point = [x: number, y: number];
const p: Point = [10, 20];
// Variadic tuples
function concat(...parts: T): T { return parts }
const t = concat([1], [2, 3] as const); // type: readonly [number[], readonly [2, 3]]
Common pitfalls
Mutating readonly arrays is not allowed.
Accessing tuple elements needs index checks if the tuple may vary in length.