import type { EventEmitter } from "node:events"; /** * Call with an emitter and an object of callbacks, and the first event to be emitted will call the callback. * If the callback returns a promise, waits for the promise to resolve or reject. eventSwitch will resolve or reject with the same value. * All added listeners are removed before eventSwitch returns. */ declare function eventSwitch(emitter: EventEmitter, cbs: { [eventName: string]: (...args: any[]) => any; }, signal?: AbortSignal | null): Promise; export = eventSwitch;