import { Cast } from './cast'; /** * the first element */ export declare type Head = T extends [infer R, ...any] ? R : never; /** * all but the first element */ export declare type Tail = T extends [any, ...infer R] ? R : never; export declare type Body = T extends [...infer R, any] ? R : never; /** * the last element */ export declare type Last = T extends [...any, infer R] ? R : never; /** * the length of the list */ export declare type Length = Cast; /** * Moves Values from the front of the right away to the end of the left. * * ShiftLeft<[0,1,2],[3,4,5,6],2> => [[0,1,2,3,4],[5,6]]] */ declare type ShiftLeft = Length extends count ? [left, right] : right extends [] ? [left, right] : ShiftLeft<[...left, Head], Tail, count>; /** * SplitArray<[0,1,2,3,4,5,6,7,8], 3> => [[0,1,2],[3,4,5,6,7,8]] */ export declare type SplitArray = ShiftLeft<[], array, count>; /** * Slice<[0,1,2,3,4,5,6,7,8], 2, 3> => [2,3,4] */ export declare type Slice> = Take>; /** * Take<2, [0,1,2,3,4]> => [0,1] */ export declare type Take = Cast[0], T>; /** * Skip<2, [0,1,2,3,4]> => [2,3,4] */ export declare type Skip = Cast[1], T>; /** * PartialList<[0,1,2,3]> => [0,1,2,3] | [0,1,2] | [0,1] | [0] | [] */ export declare type PartialList = T | (T extends [...infer R, any] ? PartialList : []); export {}; //# sourceMappingURL=array.d.ts.map