Casts an array to the structural empty tuple after checking that it is empty.
This is the structural counterpart of asEmptyArray, and the length-0 specialization of asFixedLengthTuple.
asEmptyArray
The input array type (tuple types are preserved).
The array to cast.
xs typed as readonly [] & Xs.
xs
readonly [] & Xs
const nothing = Arr.asEmptyTuple([]);// Arr.asEmptyTuple([1]); // throws TypeError Copy
const nothing = Arr.asEmptyTuple([]);// Arr.asEmptyTuple([1]); // throws TypeError
If xs is not empty.
Casts an array to the structural empty tuple after checking that it is empty.
This is the structural counterpart of
asEmptyArray, and the length-0 specialization of asFixedLengthTuple.