import { MathSubstract } from './MathSubstract.js'; import { TupleLength } from './TupleLength.js'; import { q as IsNumber, p as IsZero } from './chunks/DZEfmVOc.js'; import './MathAdd.js'; import './chunks/CM89_aaq.js'; import './BooleanNor.js'; import './BooleanNot.js'; import './BooleanOr.js'; import './Tuple.js'; import './MathNegative.js'; import './BooleanAnd.js'; import './MaybeReadonly.js'; /** * Extract a slice of a tuple type. * * @template T Tuple type to extract a slice from. * @template I Starting index of the slice. * @template J Ending index of the slice. * @returns The slice of the tuple type. * @example TupleSlice<[1, 2, 3, 4, 5], 1, 3> // [2, 3, 4] */ type TupleSlice> = IsNumber extends true ? T : T extends [infer Head, ...infer Tail] ? IsZero extends true ? IsZero extends true ? [] : [Head, ...TupleSlice>] : TupleSlice, MathSubstract> : []; export type { TupleSlice };