Casts an array to FixedLengthArray<0, E> after checking that it is empty.
Arr.isEmpty narrows to that same type, so this is its cast counterpart —
the length-0 specialization of asFixedLengthArray. Use this instead
of writing xs as unknown as FixedLengthArray<0, E>: the length is verified
at runtime, and the original array type is preserved via intersection.
Casts an array to
FixedLengthArray<0, E>after checking that it is empty.Arr.isEmptynarrows to that same type, so this is its cast counterpart — the length-0 specialization of asFixedLengthArray. Use this instead of writingxs as unknown as FixedLengthArray<0, E>: the length is verified at runtime, and the original array type is preserved via intersection.