/** * A Responder is a specialized async utility used to handle request response resolution * over WebSockets. It is a form of Deferred but supports rejecting multiple deferreds * via a context (for example a WebSocket identifier) */ export declare class Responder { #private; constructor(); /** Registers a deferred with the given context and returns an awaitable handle. */ register(context: string): string; /** Waits for the given handle to resolve. If the handle does not exist and error is thrown. */ wait(handle: string): Promise; /** Resolves a deferred with the given result */ resolve(handle: string, result: unknown): void; /** Rejects a deferred with the given error */ reject(handle: string, error: unknown): void; /** Rejects all deferreds matching the given context */ rejectFor(context: string, error: unknown): void; }