UNPKG

typescript-types

Version:
9 lines (7 loc) 262 B
import { Tail } from "./tail"; import { Prepend } from "./prepend"; import { Length } from "./length"; export type Drop<N extends number, T extends any[], I extends any[] = []> = { 0: Drop<N, Tail<T>, Prepend<any, I>>; 1: T; }[Length<I> extends N ? 1 : 0];