/**
 * Parallel Execution Utilities
 *
 * Functions for executing operations in parallel with concurrency limits.
 *
 * @since v1.29.0
 */
/**
 * Result of a parallel operation
 */
export interface ParallelResult<T> {
    /** Successful results */
    results: T[];
    /** Errors that occurred */
    errors: Array<{
        index: number;
        error: Error;
    }>;
    /** Total items processed */
    total: number;
    /** Number of successes */
    successes: number;
    /** Number of failures */
    failures: number;
}
/**
 * Progress callback for parallel operations
 */
export type ProgressCallback = (completed: number, total: number, current?: string) => void;
/**
 * Options for parallel execution
 */
export interface ParallelOptions {
    /** Maximum concurrent operations */
    concurrency?: number;
    /** Progress callback */
    onProgress?: ProgressCallback;
    /** Whether to stop on first error */
    stopOnError?: boolean;
    /** Delay between batches in milliseconds */
    batchDelay?: number;
}
/**
 * Execute operations in parallel with concurrency limit
 */
export declare function parallel<T, R>(items: T[], operation: (item: T, index: number) => Promise<R>, options?: ParallelOptions): Promise<ParallelResult<R>>;
/**
 * Execute operations grouped by a key with different concurrency per group
 */
export declare function parallelByGroup<T, R, K extends string>(items: T[], getGroup: (item: T) => K, operation: (item: T, index: number) => Promise<R>, options?: ParallelOptions & {
    groupConcurrency?: Record<K, number>;
}): Promise<ParallelResult<R>>;
/**
 * Execute with retry on failure
 */
export declare function withRetry<T>(operation: () => Promise<T>, options?: {
    maxRetries?: number;
    delay?: number;
    backoff?: number;
}): Promise<T>;
/**
 * Execute with timeout
 */
export declare function withTimeout<T>(operation: () => Promise<T>, timeoutMs: number): Promise<T>;
/**
 * Debounce a function
 */
export declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, delay: number): T;
/**
 * Throttle a function
 */
export declare function throttle<T extends (...args: unknown[]) => unknown>(fn: T, limit: number): T;
//# sourceMappingURL=parallel.d.ts.map