import type { Undefinable } from '../type'; export * from './utils'; /** * fp * const array = [1, 2, 3, 4, 5]; * const result = moveArrayItem(array, 1, 3); * expect(result).toEqual([1, 3, 4, 2, 5]); * @param arr * @param from * @param to */ export declare const moveArrayItem: (arr: T[], from: number, to: number) => T[]; /** * fp * const array = [1, 2, 3, 4, 5]; * const result = swapArrayItem(array, 1, 3); * expect(result).toEqual([1, 4, 3, 2, 5]); * @param arr * @param source * @param target */ export declare const swapArrayItem: (arr: T[], source: number, target: number) => T[]; export declare const randomIndex: (length: number) => number; export declare const randomItem: (arr: T[]) => T; export declare const randomItems: (arr: T[], count: number) => T[]; export declare const lastItem: (arr: T[]) => Undefinable; export declare const firstItem: (arr: T[]) => Undefinable; /** * fp * @param arr * @param index */ export declare const removeItemWithIndex: (arr: T[], index: number) => T[];