assertKeyedRateLimitReferenceState()
Validate state from any supported reference-transition family.
Import
Section titled “Import”import { assertKeyedRateLimitReferenceState } from "@graphrefly/ts/rate-limit";Signature
Section titled “Signature”function assertKeyedRateLimitReferenceState(value: unknown): KeyedRateLimitReferenceStateParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | Candidate fixed-window, sliding-window, or token-bucket state. |
Returns
Section titled “Returns”The immutable normalized reference state.
Example
Section titled “Example”import { assertKeyedRateLimitReferenceState } from "@graphrefly/ts/rate-limit";Source
Section titled “Source”packages/ts/src/rate-limit/keyed-rate-limit-algorithms.ts