Vertex Viewer SDK
    Preparing search index...

    Function timeout

    • Returns a promise that will reject after the given duration.

      Parameters

      • ms: number

        A duration in milliseconds.

      Returns Promise<void>

    • Assigns a timeout to the given promise, where if the promise doesn't complete within the given duration an exception will be thrown.

      Type Parameters

      • T

      Parameters

      • ms: number

        The timeout, in milliseconds.

      • promise: Promise<T>

        The promise to assign a timeout to.

      Returns Promise<T>