Simple queue of promises, which are run one after the other.

Constructors

Properties

Methods

Constructors

Properties

_queue: (() => Promise<void>)[] = []

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

Methods

  • Run the given promise once any other promise given to previous calls of this function have settled. Another promise is returned with its state matching the state of the given promise. This can be used to wait on the given promise to be settled.

    Parameters

    • promise: (() => void | Promise<void>)

      The promise to run.

        • (): void | Promise<void>
        • Returns void | Promise<void>

    Returns Promise<void>

    A promise matching the state of the promise given to be run.

Generated using TypeDoc