declare function toArray(v: T | T[] | undefined | null): T[]; declare const fromLength: (length: number) => number[]; declare const first: (v: T[]) => T | undefined; declare const last: (v: T[]) => T | undefined; declare const isEmpty: (v: T[]) => boolean; declare const has: (v: T[], t: T) => boolean; declare const add: (v: T[], ...items: T[]) => T[]; declare const remove: (v: T[], ...items: T[]) => T[]; declare const removeAt: (v: T[], i: number) => T[]; declare const insertAt: (v: T[], i: number, ...items: T[]) => T[]; declare const uniq: (v: T[]) => T[]; declare const diff: (a: T[], b: T[]) => T[]; declare const addOrRemove: (v: T[], item: T) => T[]; declare function clear(v: T[]): T[]; type IndexOptions = { step?: number | undefined; loop?: boolean | undefined; }; declare function nextIndex(v: T[], idx: number, opts?: IndexOptions): number; declare function next(v: T[], idx: number, opts?: IndexOptions): T | undefined; declare function prevIndex(v: T[], idx: number, opts?: IndexOptions): number; declare function prev(v: T[], index: number, opts?: IndexOptions): T | undefined; declare function chunk(v: T[], size: number): T[][]; declare function flatArray(arr: T[]): T[]; declare function partition(arr: T[], fn: (value: T) => boolean): [T[], T[]]; export { type IndexOptions, add, addOrRemove, chunk, clear, diff, first, flatArray, fromLength, has, insertAt, isEmpty, last, next, nextIndex, partition, prev, prevIndex, remove, removeAt, toArray, uniq };