Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 689 Bytes

File metadata and controls

45 lines (33 loc) · 689 Bytes

typelab / aliases / ReadonlyTuple

type ReadonlyTuple<T> = readonly [...T];

Type that represents a read-only tuple, which is a fixed-length, immutable array of elements of type T.

Type Parameters

Type Parameter Default type Description

T extends ReadonlyList

Any[]

The type of the elements in the read-only tuple, defaults to any[].

Example

// MyReadonlyTuple is readonly [number, string]
type MyReadonlyTuple = ReadonlyTuple<[number, string]>;