Function timeout

  • Returns a promise that resolves after the given duration. Basically a setTimeout that returns a promise.

    Parameters

    • duration: number

      in ms

    Returns Promise<unknown>