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