Skip to content
File

Blob: types/defines/ratelimit.d.ts

typescript17 lines
1interface RateLimitOptions {
2 key: string
3}
4 
5interface RateLimitOutcome {
6 success: boolean
7}
8 
9interface RateLimit {
10 /**
11 * Rate limit a request based on the provided options.
12 * @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
13 * @returns A promise that resolves with the outcome of the rate limit.
14 */
15 limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
16}