combineRateLimits
function combineRateLimits(a, b): RateLimit;Defined in: tanstack/core/rate-limit.ts:81
When several updates coincide in the same tick, the strongest limit wins: the longest delay, and debounce dominates throttle (it waits for settling). The store uses this to merge batched updates; adapter authors can reuse it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
a |
RateLimit |
b |
RateLimit |
Returns
Section titled “Returns”Example
Section titled “Example”import { combineRateLimits, debounce, throttle } from "@xtandard/lib/tanstack";
combineRateLimits(throttle(50), throttle(120)); // → { method: "throttle", timeMs: 120 }combineRateLimits(throttle(50), debounce(10)); // → { method: "debounce", timeMs: 50 }