lifecycle-utils
    Preparing search index...

    Function sleep

    • Returns a promise that resolves after the given duration.

      If a signal is provided and is aborted before the duration has elapsed, then the promise is rejected with signal.reason.

      Parameters

      • signal: AbortSignal | undefined
      • duration: number

        the duration to wait in milliseconds

      Returns Promise<void>

    • Returns a promise that resolves after the given duration.

      If a signal is provided and is aborted before the duration has elapsed, then the promise is rejected with signal.reason.

      Parameters

      • duration: number

        the duration to wait in milliseconds

      • signal: AbortSignal | undefined

      Returns Promise<void>

    • Returns a promise that resolves after the given duration.

      If a signal is provided and is aborted before the duration has elapsed, then the promise is rejected with signal.reason.

      Parameters

      • duration: number

        the duration to wait in milliseconds

      Returns Promise<void>