kaven-basic - v6.0.0
    Preparing search index...

    Function TimeoutAfter

    • Returns a promise that resolves or rejects with the result of the given action, or rejects with a timeout error if the action does not settle within the specified time.

      Type Parameters

      • T

      Parameters

      • action: Promise<T>

        The promise to race against the timeout.

      • timeout: number = 500

        The maximum time (in milliseconds) to wait for the action to settle. Defaults to 500ms.

      Returns Promise<T>

      A promise that resolves or rejects with the result of the action, or rejects if the timeout is reached first.

      2.0.6

      2020-06-02