import { Emitter } from './emitter'; export interface AsyncEventCancellationToken { isCancellationRequested: boolean; } export interface IWaitUntil { token: AsyncEventCancellationToken; waitUntil(thenable: Promise): void; } export type IWaitUntilData = Omit, 'token'>; export declare class AsyncEmitter extends Emitter { private _asyncDeliveryQueue?; emitAsync(data: IWaitUntilData, token: AsyncEventCancellationToken, promiseJoin?: (p: Promise, listener: Function) => Promise): Promise; }