import type { Tag } from '../../types/common'; export type PendingCommand = { readonly tag: Tag; readonly command: string; readonly resolve: (value: T) => void; readonly reject: (error: Error) => void; readonly createdAt: number; }; export type CommandQueueOptions = { readonly prefix?: string; readonly maxConcurrent?: number; }; export declare class CommandQueue implements AsyncDisposable { private counter; private readonly prefix; private readonly maxConcurrent; private readonly pending; private readonly waitQueue; private disposed; constructor(options?: CommandQueueOptions); get isDisposed(): boolean; get pendingCount(): number; get queueLength(): number; nextTag(): Tag; acquire(): Promise; register(tag: Tag, command: string): Promise; resolve(tag: Tag, value: unknown): boolean; reject(tag: Tag, error: Error): boolean; rejectAll(error: Error): void; has(tag: Tag): boolean; get(tag: Tag): PendingCommand | undefined; dispose(): void; [Symbol.asyncDispose](): Promise; private releaseSlot; } export declare const createCommandQueue: (options?: CommandQueueOptions) => CommandQueue; //# sourceMappingURL=command-queue.d.ts.map