declare type ResponderHandle = number; export declare class Responder { #private; constructor(); /** Registers a new responder with specified context */ register(): ResponderHandle; /** Returns true if this handle exists */ has(handle: number): boolean; /** Waits for the given handle to resolve. If the handle does not exist and error is thrown. */ wait(handle: ResponderHandle): Promise; /** Resolves a deferred with the given result */ resolve(handle: ResponderHandle, value: T): void; /** Rejects a deferred with the given error */ reject(handle: ResponderHandle, error: Error): void; /** Rejects all deferreds matching the given context */ rejectAll(error: Error): void; } export {};