Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace WaitUntilEvent

Hierarchy

Index

Functions

Methods

Functions

fire

  • fire<T>(emitter: Emitter<T>, event: Omit<T, "waitUntil">, timeout?: number | undefined): Promise<void>
  • Fire all listeners in the same tick.

    Use AsyncEmitter.fire to fire listeners async one after another.

    Type parameters

    Parameters

    • emitter: Emitter<T>
    • event: Omit<T, "waitUntil">
    • Default value timeout: number | undefined = undefined

    Returns Promise<void>

Methods

waitUntil

  • waitUntil(thenable: Promise<any>): void
  • Allows to pause the event loop until the provided thenable resolved.

    Note: It can only be called during event dispatch and not in an asynchronous manner

    Parameters

    • thenable: Promise<any>

      A thenable that delays execution.

    Returns void