AniLink - v3.0.0
    Preparing search index...

    Function resolveDiagnosticsMode

    • Resolves a caller-supplied diagnostics mode, defaulting to "warn" and throwing on any other value.

      Every entry path for the option, per-request options (RequestOptions.diagnostics), the MAL refresh lifecycle, and the pagination helpers, validates through this one helper so a typo like "verbose" fails fast with the received value in the message, matching the fail-fast convention of resolveRequestOptions, instead of behaving as an accidental quasi-"hook" mode deep inside the emit path.

      Parameters

      • diagnostics: DiagnosticsMode | undefined

        The caller-supplied mode, when provided.

      Returns DiagnosticsMode

      The resolved mode, or "warn" when the input is undefined or null.

      A TypeError when the value is defined but not one of the three modes.