type ExecutableItem<T = unknown, TArgs extends readonly unknown[] = readonly []> = {
    execute: (...args: TArgs) => Promise<T>;
};
type DataItem<T = unknown> = {
    data: T;
};
type ItemType = 'executable' | 'data';
type ItemTypeMap<ItemResult = unknown, TArgs extends readonly unknown[] = readonly []> = {
    executable: ExecutableItem<ItemResult, TArgs>;
    data: DataItem<ItemResult>;
};
type Item<Type extends ItemType = ItemType, ItemResult = unknown, TArgs extends readonly unknown[] = readonly []> = ItemTypeMap<ItemResult, TArgs>[Type];
export type BatchQueueParams<Type extends ItemType = ItemType, ItemResult = unknown, TArgs extends readonly unknown[] = readonly []> = {
    batchSize?: number;
    batchProcessor: (items: Item<Type, ItemResult, TArgs>[]) => Promise<void>;
};
export declare function isDataItem<T = unknown>(item: Item<ItemType, T>): item is DataItem<T>;
export declare function isExecutableItem<T = unknown, TArgs extends readonly unknown[] = readonly []>(item: Item<ItemType, T, TArgs>): item is ExecutableItem<T, TArgs>;
export declare class BatchQueue<Type extends ItemType = ItemType, ItemResult = unknown, TArgs extends readonly unknown[] = readonly []> {
    #private;
    constructor(params: BatchQueueParams<Type, ItemResult, TArgs>);
    addItem(item: Item<Type, ItemResult, TArgs>): Promise<ItemResult>;
    processRemainingItems(): Promise<void>;
    get isProcessing(): boolean;
}
export {};
//# sourceMappingURL=queue.d.ts.map