Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AsyncEmitter<T>

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Protected _callbacks

_callbacks: CallbackList | undefined

Protected deliveryQueue

deliveryQueue: Promise<void> | undefined

Accessors

event

Methods

Protected checkMaxListeners

  • checkMaxListeners(maxListeners: number): (() => void) | undefined

Protected deliver

  • deliver(listeners: Callback[], event: Omit<T, "waitUntil">, token: CancellationToken, promiseJoin?: undefined | ((p: Promise<any>, listener: Function) => Promise<any>)): Promise<void>

dispose

  • dispose(): void

fire

  • fire(event: Omit<T, "waitUntil">, token?: CancellationToken, promiseJoin?: undefined | ((p: Promise<any>, listener: Function) => Promise<any>)): Promise<void>
  • Fire listeners async one after another.

    Parameters

    • event: Omit<T, "waitUntil">
    • Default value token: CancellationToken = CancellationToken.None
    • Optional promiseJoin: undefined | ((p: Promise<any>, listener: Function) => Promise<any>)

    Returns Promise<void>

Protected popLeakingStack

  • popLeakingStack(stack: string): void

Protected pushLeakingStack

  • pushLeakingStack(): () => void

sequence

  • sequence(processor: (listener: (e: T) => any) => MaybePromise<boolean>): Promise<void>