export declare class TimeoutError extends Error {
    context?: any | undefined;
    constructor(context?: any | undefined);
}
export declare class TimeoutPromise<T> implements Promise<T> {
    [Symbol.toStringTag]: any;
    private promise;
    constructor(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (e?: any) => void) => void, timeout: number, context?: any);
    then<R, E>(onfulfilled?: (value: T) => PromiseLike<R> | R, onrejected?: (reason: any) => PromiseLike<E> | E): Promise<R | E>;
    catch<TResult>(onrejected?: (reason: any) => PromiseLike<TResult> | TResult): Promise<T | TResult>;
    finally(onfinally?: (() => void) | undefined | null): Promise<T>;
}
export declare function timeoutPromise<T>(p: Promise<T>, timeout: number, context?: any): Promise<T>;
