import * as utils from './utils'; /** * Choose type base on whether or not a tuple is finite * @example IsFinite<[0, 1, 2]> → true * @example IsFinite<[0, 1, 2, ...number[]]> → false * @example IsFinite<[0], 'Finite', 'Infinite'> → 'Finite' * @example IsFinite<[0, ...number[]], 'Finite', 'Infinite'> → Infinite */ export declare type IsFinite = utils.IsFinite; /** * Get type of first element * @example First<[0, 1, 2]> → 0 */ export declare type First = Tuple[0]; /** * Get type of last element * @example Last<[0, 1, 2]> → 2 */ export declare type Last = utils.Last; /** * Drop the first element * @example Tail<[0, 1, 2, 3]> → [1, 2, 3] */ export declare type Tail = utils.Tail; /** * Add an element to the end of a tuple * @example Append<[0, 1, 2], 'new'> → [0, 1, 2, 'new'] */ export declare type Append = Reverse, Addend>>; /** * Add an element to the beginning of a tuple * @example Prepend<[0, 1, 2], 'new'> → ['new', 0, 1, 2] */ export declare type Prepend = utils.Prepend; /** * Reverse a tuple * @example Reverse<[0, 1, 2]> → [2, 1, 0] */ export declare type Reverse = utils.Reverse; /** * Concat two tuple into one * @example Concat<[0, 1, 2], ['a', 'b', 'c']> → [0, 1, 2, 'a', 'b', 'c'] */ export declare type Concat = utils.Concat; /** * Repeat a certain type into a tuple * @example Repeat<'foo', 4> → ['foo', 'foo', 'foo', 'foo'] * @warning To avoid potential infinite loop, Count must be an integer greater than or equal to 0 */ export declare type Repeat = utils.Repeat; /** * Concat multiple tuples * @example ConcatMultiple<[], [0], [1, 2], [3, 4, 5]> → [0, 1, 2, 3, 4, 5] */ export declare type ConcatMultiple = utils.ConcatMultiple; /** * Drop `Quantity` first elements of a tuple * @example Drop<['a', 'b', 'c', 'd', 'e'], 2> → ['c', 'd', 'e'] * @example Drop<['a', 'b', 'c', 'd', 'e', ...string[]], 2> → ['c', 'd', 'e', ...string[]] * @example Drop<['a', 'b', 'c', 'd', 'e', ...string[]], 10> → string[] */ export declare type Drop = utils.Drop; /** * Slice a tuple * @example SliceStartQuantity<[0, 1, 2, 3, 4, 5, 6], 2, 3> → [2, 3, 4] * @example SliceStartQuantity<[0, 1, 2, 3, 4, 5, 6], 2, 9> → [2, 3, 4, 5, 6] */ export declare type SliceStartQuantity = utils.SliceStartQuantity; /** * Fill a tuple of types * @example FillTuple<[0, 1, 2], 'x'> → ['x', 'x', 'x'] * @example FillTuple → 'x'[] */ export declare type FillTuple = utils.FillTuple; /** * Compare length of two tuple * @example CompareLength<[0, 1, 2], ['a', 'b', 'c']> → 'equal' * @example CompareLength<[0, 1], ['a', 'b', 'c']> → 'shorterLeft' * @example CompareLength<[0, 1, 2], ['a', 'b']> → 'shorterRight' */ export declare type CompareLength = utils.CompareLength; /** * Sort two tuples in order of [shorter, longer] * @example SortTwoTuple<[0, 1, 2, 3], ['a', 'b']> → [['a', 'b'], [0, 1, 2, 3]] * @example SortTwoTuple<[0, 1], ['a', 'b', 'c', 'd']> → [[0, 1], ['a', 'b', 'c', 'd']] * @example SortTwoTuple<[0, 1, 2], ['a', 'b', 'c']> → [[0, 1, 2], ['a', 'b', 'c']] * @example SortTwoTuple<[0, 1, 2], ['a', 'b', 'c'], 'EQUAL'> → 'EQUAL' */ export declare type SortTwoTuple = utils.SortTwoTuple; /** * Find shortest tuple in a set of tuples * @example ShortestTuple<[[0, 1, 2], [true, false], ['a', 'b', 'c', 'd']]> → [true, false] */ export declare type ShortestTuple = utils.ShortestTuple; /** * Find shortest tuple in a set of tuples * @example LongestTuple<[[0, 1, 2], [true, false], ['a', 'b', 'c', 'd']]> → ['a', 'b', 'c', 'd'] */ export declare type LongestTuple = utils.LongestTuple; /** * Filter tuple elements thats match the mask * @example FilterTuple<[1, 2, true, '3'], string | number> → [1, 2, "3"] */ export declare type FilterTuple = utils.FilterTuple;