Creates a Type for a readonly array with at most maxLength elements,
typed as the branded MaxLengthArray instead of the union of tuple
types produced by maxLengthTuple.
Because the length constraint lives only in the brand, no union of tuples
of the element type is ever constructed, which keeps type-checking cheap
even when A is a large type.
Creates a
Typefor a readonly array with at mostmaxLengthelements, typed as the branded MaxLengthArray instead of the union of tuple types produced bymaxLengthTuple.Because the length constraint lives only in the brand, no union of tuples of the element type is ever constructed, which keeps type-checking cheap even when
Ais a large type.