• Run a promise but make sure to wait only a maximum amount of time for it to finish.

    Type Parameters

    • T

    Parameters

    • promise: (() => Promise<T>)

      The promise to execute

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

    • timeoutMs: number

      The amount of time in milliseconds to wait for the promise to finish

    Returns Promise<T>

    The promise return value or a timeout error is thrown

Generated using TypeDoc