import { Ratelimit } from '@upstash/ratelimit'; import { R as RateLimiter, a as RateLimitOptions, b as RateLimitResult } from '../shared/ratelimit.BtcMexUf.mjs'; interface UpstashRateLimiterOptions { /** * Block until the request may pass or timeout is reached. */ blockingUntilReady?: { enabled: boolean; /** * milliseconds */ timeout: number; }; /** * For the MultiRegion setup we do some synchronizing in the background, after returning the current limit. * Or when analytics is enabled, we send the analytics asynchronously after returning the limit. * In most case you can simply ignore this. * * On Vercel Edge or Cloudflare workers, you might need `.bind` before assign: * ```ts * const ratelimiter = new UpstashRateLimiter(ratelimit, { * waitUntil: ctx.waitUntil.bind(ctx), * }) * ``` */ waitUntil?: (promise: Promise) => any; } declare class UpstashRateLimiter implements RateLimiter { private readonly ratelimit; private blockingUntilReady; private waitUntil; constructor(ratelimit: Ratelimit, options?: UpstashRateLimiterOptions); limit(key: string, options?: RateLimitOptions): Promise>; private checkLimit; private blockUntilReady; private resolveWeight; } export { UpstashRateLimiter }; export type { UpstashRateLimiterOptions };