import { MapOptions, SerializableFunction, ThreadOptions } from '../types'; /** * Interface for array operation executor. * Allows this module to be used with any ThreadTS-like instance. */ export interface ArrayOperationExecutor { run(fn: SerializableFunction, data?: unknown, options?: ThreadOptions): Promise; map(array: T[], fn: SerializableFunction, options?: MapOptions): Promise; } /** * Creates array operation methods bound to a specific executor. * This factory pattern allows for dependency injection and testing. * * @param _executor - The executor instance (ThreadTS or compatible) - reserved for future parallel implementations * @returns Object containing all array operation methods */ export declare function createArrayOperations(_executor: ArrayOperationExecutor): { indexOf: (array: T[], searchElement: T, fromIndex?: number) => Promise; lastIndexOf: (array: T[], searchElement: T, fromIndex?: number) => Promise; at: (array: T[], index: number) => Promise; slice: (array: T[], start?: number, end?: number) => Promise; concat: (array: T[], ...items: (T | T[])[]) => Promise; fill: (array: T[], value: T, start?: number, end?: number) => Promise; includes: (array: T[], searchElement: T, fromIndex?: number) => Promise; join: (array: T[], separator?: string) => Promise; reverse: (array: T[]) => Promise; sort: (array: T[], compareFn?: (a: T, b: T) => number) => Promise; range: (start: number, end: number, step?: number) => Promise; repeat: (value: T, count: number) => Promise; zip: (...arrays: T) => Promise<{ [K in keyof T]: T[K] extends (infer U)[] ? U : never; }[]>; unzip: (array: T[]) => Promise<{ [K in keyof T]: T[K][]; }>; unique: (array: T[]) => Promise; uniqueBy: (array: T[], keyFn: (item: T) => K) => Promise; flat: (array: T[], depth?: number) => Promise; chunk: (array: T[], size: number) => Promise; findLast: (array: T[], predicate: (value: T, index: number, array: T[]) => boolean) => Promise; findLastIndex: (array: T[], predicate: (value: T, index: number, array: T[]) => boolean) => Promise; toSorted: (array: T[], compareFn?: (a: T, b: T) => number) => Promise; toReversed: (array: T[]) => Promise; withElement: (array: T[], index: number, value: T) => Promise; toSpliced: (array: T[], start: number, deleteCount?: number, ...items: T[]) => Promise; groupByObject: (array: T[], keyFn: (item: T, index: number) => K) => Promise>>; }; /** * Type for the array operations object returned by createArrayOperations. */ export type ArrayOperations = ReturnType; //# sourceMappingURL=array-operations.d.ts.map