AniLink - v3.0.0
    Preparing search index...

    Function mergeOptions

    • Merges per-request transport settings over the instance-level ones, the two caller-supplied layers of the precedence chain documented in the module header; resolveRequestOptions then applies the library defaults. A field set on overrides wins; every other field keeps the instance value. The nested configuration objects (DEEP_MERGED_OPTION_KEYS: retry, circuitBreaker, retryBudget) are merged field-by-field, so a per-request { retry: { maxRetries: 0 } } keeps the instance's retryOnStatus and baseDelayMs instead of silently falling back to library defaults. Passing no overrides returns the instance options unchanged, so the zero-cost path stays allocation-free.

      Parameters

      • base: RequestOptions | undefined

        Instance-level transport settings, when configured.

      • overrides: RequestOptions | undefined

        Per-request settings that take precedence over base.

      Returns RequestOptions | undefined

      The merged settings, or the defined input when only one side exists.