Casts an array to FixedLengthTuple<Length, E> after checking that it has
exactly length elements.
This is the structural counterpart of asFixedLengthArray: it produces a
tuple type rather than the branded FixedLengthArray. Prefer the branded
one unless you specifically need the structural type — the brand keeps
type-checking cost independent of the element type and of the bound.
The length argument comes first, matching the type-parameter order of
FixedLengthTuple<Length, Elm>. Omitting the array returns a function that
casts one.
The exact number of elements.
The exact number of elements.
xs typed as FixedLengthTuple<Length, Xs[number]> & Xs.
Casts an array to
FixedLengthTuple<Length, E>after checking that it has exactlylengthelements.This is the structural counterpart of
asFixedLengthArray: it produces a tuple type rather than the brandedFixedLengthArray. Prefer the branded one unless you specifically need the structural type — the brand keeps type-checking cost independent of the element type and of the bound.The length argument comes first, matching the type-parameter order of
FixedLengthTuple<Length, Elm>. Omitting the array returns a function that casts one.