import Emittery from "emittery"; declare var Promise: { /** * Attaches a callback for only the rejection of the Promise. * @param onrejected - The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): PromiEvent; /** * Creates a new resolved promievent for the provided value. * @param value - A promise. * @returns A promievent whose internal state matches the provided promise. */ resolve(value: T | PromiseLike): PromiEvent; /** * Creates a new resolved promievent. * @returns A resolved promievent. */ resolve(): PromiEvent; } & PromiseConstructor; declare const emitteryMethods: readonly ["clearListeners", "once", "on", "emit", "onAny"]; declare class PromiEvent extends Promise { constructor(executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void); /** * Attaches a callback for only the rejection of the Promise. * @param onrejected - The callback to execute when the Promise is rejected. * @returns A PromiEvent for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): PromiEvent; /** * Creates a new resolved promievent. * @returns A resolved promievent. */ static resolve(): PromiEvent; /** * Creates a new resolved promievent for the provided value. * @param value - A promise. * @returns A promievent whose internal state matches the provided promise. */ static resolve(value: T | PromiseLike): PromiEvent; /** * Used to immediately clear all event listeners on the instance and prevent * any additional binding or emission from the Emitter. * * Once disposed no listeners can be bound to this emitter. * * Note: `dispose` is pre-bound to the `this`, making it possible to pass the * method around detached from it's context. */ dispose: () => void; } interface PromiEvent extends Promise, Pick { emittery: Emittery; } export default PromiEvent; //# sourceMappingURL=promievent.d.ts.map