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