Vinyl
    Preparing search index...

    Function timeout

    • Returns a promise that will reject after the provided number of seconds. If the optional abort signal is aborted, the timer will be canceled and the promise resolved. This is the inverse of sleep

      Parameters

      • time: number

        The number of seconds to wait.

      • Optionalabort: ReadonlyAbort

        If provided, when aborted (regardless of reason) will resolve the returned promise.

      • message: string = 'Timed out after {0}s'

        The message to be used in the TimeoutError in case of timeout.

      • origin: string = ErrorOrigin.INTERNAL

        The error origin. (default: ErrorOrigin.INTERNAL)

      • level: ErrorLevel = ErrorLevel.FATAL

        The error level (default: ErrorLevel.FATAL)

      Returns Promise<void>