- once<
E extends string,
T extends Record<string, (...args: any[]) => void>,
K extends string | number | symbol,
>(
emitter: FreeSwitchEventEmitter<E, T>,
event: K,
): Promise<Parameters<T[K]>> Type Parameters
- E extends string
- T extends Record<string, (...args: any[]) => void>
- K extends string | number | symbol
Returns Promise<Parameters<T[K]>>
Returns a Promise that is resolved the next time the named event is emitted on the emitter.