File
Blob: types/defines/ratelimit.d.ts
| 1 | interface RateLimitOptions { |
| 2 | key: string |
| 3 | } |
| 4 | |
| 5 | interface RateLimitOutcome { |
| 6 | success: boolean |
| 7 | } |
| 8 | |
| 9 | interface 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 | } |