_NextValue type

Utility type to get the next value for a recursive conditional evaluation.

export declare type _NextValue<Set extends unknown[], Current extends unknown[]> = Set[Current['length']];

Remarks

Set should be the full set of values to recurse over and Current is the set of values already evaluated. Therefore, indexing into Set with Current's length yields the next value to evaluate.