parcoursup/node_modules/@tootallnate/once/dist/index.d.ts
lalBi94 7bc56c09b5 $
2023-03-05 13:23:23 +01:00

8 lines
407 B
TypeScript

/// <reference types="node" />
import { EventEmitter } from 'events';
import { EventNames, EventListenerParameters, AbortSignal } from './types';
export interface OnceOptions {
signal?: AbortSignal;
}
export default function once<Emitter extends EventEmitter, Event extends EventNames<Emitter>>(emitter: Emitter, name: Event, { signal }?: OnceOptions): Promise<EventListenerParameters<Emitter, Event>>;