import { List } from '../util/List'; import { Inc } from '../number/Inc'; import { NumberToString } from '../cast/NumberToString'; import { Matches } from '../type/Matches'; /** * From a tuple-like type, get the subset up to a certain index */ export type ListTo< R extends List, N extends number, I extends number = 0, Acc extends List = { length: N } > = { 0: Acc, 1: ListTo }[Matches];