AniLink - v3.0.0
    Preparing search index...

    Function sleep

    • Resolves after ms, or rejects with an ABORTED AniLinkNetworkError stamped with requestId when the supplied AbortSignal fires first (including one that aborted before the call).

      The timer is unref-ed so it never keeps the event loop alive on its own.

      Parameters

      • ms: number

        The duration to wait in milliseconds.

      • Optionalsignal: AbortSignal

        Optional signal that cancels the wait.

      • OptionalrequestId: string

        Correlation ID stamped onto the abort error, when available.

      Returns Promise<void>

      A promise that resolves after the delay, or rejects on abort.