Skip to content
PACKAGES

assertKeyedRateLimitReferenceState()

Validate state from any supported reference-transition family.

import { assertKeyedRateLimitReferenceState } from "@graphrefly/ts/rate-limit";
function assertKeyedRateLimitReferenceState(value: unknown): KeyedRateLimitReferenceState
ParameterTypeDescription
valueunknownCandidate fixed-window, sliding-window, or token-bucket state.

The immutable normalized reference state.

import { assertKeyedRateLimitReferenceState } from "@graphrefly/ts/rate-limit";

packages/ts/src/rate-limit/keyed-rate-limit-algorithms.ts