/// import { ChildProcess } from 'child_process'; import { EventEmitter } from 'events'; import { Readable, Writable } from 'stream'; export declare type EventEmitterResultAssertion = (result: any) => T; declare module '../index' { /** * Create a promise for an event emitter. */ function awaitable(emitter: EventEmitter, types: string | string[], errorEmitters?: EventEmitter[]): Promise; function awaitable(emitter: EventEmitter, types: string | string[], errorEmitters?: EventEmitter[]): Promise; function awaitable(emitter: EventEmitter, types: string | string[], assertion: EventEmitterResultAssertion, errorEmitters?: EventEmitter[]): Promise; /** * Create a promise for a `ChildProcess` object. * @param process The process to listen on 'exit' and 'error' events for * fulfillment or rejection. */ function awaitable(process: ChildProcess, errorEmitters?: EventEmitter[]): Promise; /** * Create a promise for a stream. * @param stream The stream to listen on 'close' and 'error' events for * fulfillment or rejection. */ function awaitable(stream: Readable | Writable, errorEmitters?: EventEmitter[]): Promise; }