Icard/angular-clarity-master(work.../node_modules/@tootallnate/once/dist/index.d.ts

8 lines
407 B
TypeScript
Raw Normal View History

2024-07-16 14:55:36 +00:00
/// <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>>;