Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AsyncEmitter<T>

Type Parameters

Hierarchy

Index

Constructors

Properties

_callbacks: undefined | CallbackList
deliveryQueue: undefined | Promise<void>

Accessors

Methods

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

    • listeners: Callback[]
    • event: Omit<T, "waitUntil">
    • token: CancellationToken
    • Optional promiseJoin: ((p: Promise<any>, listener: Function) => Promise<any>)
        • (p: Promise<any>, listener: Function): Promise<any>
        • Parameters

          • p: Promise<any>
          • listener: Function

          Returns Promise<any>

    Returns Promise<void>

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

    Parameters

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

          • p: Promise<any>
          • listener: Function

          Returns Promise<any>

    Returns Promise<void>

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