assertSlidingWindowRateLimitState()
Validate exact bounded and canonically ordered sliding-window-v1 state.
Import
Section titled “Import”import { assertSlidingWindowRateLimitState } from "@graphrefly/ts/rate-limit";Signature
Section titled “Signature”function assertSlidingWindowRateLimitState(value: unknown): SlidingWindowRateLimitStateParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | Candidate strict JSON state material. |
Returns
Section titled “Returns”The immutable normalized sliding-window state.
Example
Section titled “Example”import { assertSlidingWindowRateLimitState } from "@graphrefly/ts/rate-limit";Source
Section titled “Source”packages/ts/src/rate-limit/keyed-rate-limit-algorithms.ts