The desired size of each partition (must be a positive integer literal).
The readonly tuple type to partition.
type P1 = Tuple.Partition<2, [1, 2, 3, 4, 5]>; // readonly [readonly [1, 2], readonly [3, 4], readonly [5]]
type P2 = Tuple.Partition<3, [1, 2, 3, 4, 5, 6]>; // readonly [readonly [1, 2, 3], readonly [4, 5, 6]]
type P3 = Tuple.Partition<1, [1, 2]>; // readonly [readonly [1], readonly [2]]
type P4 = Tuple.Partition<5, [1, 2]>; // readonly [readonly [1, 2]]
Partitions a readonly tuple
Tinto sub-tuples of lengthN. The last sub-tuple may have fewer thanNelements if the length ofTis not divisible byN.