import type { RpcRequest, RpcResponse } from './protocol.js'; import type { BatchConfig } from './types.js'; export interface BatchSchedulerOptions extends BatchConfig { /** Return RPC errors as results instead of throwing (default: false) */ raw?: boolean; /** Send a single request individually (fallback when batching is disabled) */ sendSingle?: (request: RpcRequest) => Promise; /** Custom predicate to detect batch rejection errors (default: checks for parse error / invalid request codes) */ isBatchRejection?: (error: unknown) => boolean; } export declare class BatchScheduler { private queue; private timer; private config; private raw; private send; private sendSingle?; private checkBatchRejection; private _disabled; private disableTimer; constructor(config: BatchSchedulerOptions, send: (requests: RpcRequest[]) => Promise); get disabled(): boolean; enqueue(request: RpcRequest): Promise; flush(): Promise; private disableBatching; } //# sourceMappingURL=batch.d.ts.map