Skip to content

combineResolvedOptions

function combineResolvedOptions(a, b): ResolvedOptions;

Defined in: tanstack/core/options.ts:139

Combine resolved options from multiple updates batched in the same tick. The “loudest” update wins: push over replace, full navigation over shallow, scroll over no-scroll, and the strongest rate limit. The clearOn* flags stay on only if both have them on, and b’s startTransition wins when both set one.

Parameter Type
a ResolvedOptions
b ResolvedOptions

ResolvedOptions

import { combineResolvedOptions, debounce, resolveOptions } from "@xtandard/lib/tanstack";
const a = resolveOptions({ callOptions: { shallow: true } });
const b = resolveOptions({ callOptions: { history: "push", limitUrlUpdates: debounce(300) } });
combineResolvedOptions(a, b);
// → { history: "push", shallow: true, scroll: false, clearOnDefault: true,
// clearOnInvalid: true, limitUrlUpdates: { method: "debounce", timeMs: 300 } }