import { MaybePromise } from '../../types';
export type BatchCallbackLookup<V, R> = (value: V) => MaybePromise<R>;
export type BatchCallback<V, R> = (values: V[]) => MaybePromise<Map<V, R> | BatchCallbackLookup<V, R>>;
export type BatchOptions = {
    maxBatchSize?: number;
    maxWaitMilliseconds?: number;
};
export declare class BatchProcessor<V, R> {
    private readonly callback;
    private readonly options;
    private readonly queue;
    private timeout;
    private waitingSince;
    constructor(callback: BatchCallback<V, R>, options?: BatchOptions);
    batch(value: V): Promise<R>;
    process(): void;
    private requestProcessQueue;
    private waitToProcessQueue;
    private shouldProcessNow;
    private maxBatchSizeReached;
    private maxWaitReached;
    private getBatchToProcess;
    private processQueue;
    private resolveBatchUsingMap;
    private resolveBatchUsingLookup;
    private rejectBatch;
    private isBatchCallbackLookup;
}
