import type { IncomingMessage, ServerResponse } from 'node:http'; import { type RateLimiterConsume, type RateLimiterI, type RateLimiterReset, type RateLimiterStatus } from './rate-limiter.js'; export interface HttpRateLimiterContext { req: IncomingMessage; res?: ServerResponse; } export type HttpRateLimiterOptions = { bypass?: (ctx: C) => boolean; }; /** * Wraps a {@link RateLimiterI} class with an {@link RateLimiterI} * implementation that will apply the appropriate headers to the response if a * limit is exceeded. */ export declare class HttpRateLimiter implements RateLimiterI { private readonly rateLimiter; private readonly options; constructor(rateLimiter: RateLimiterI, options?: Readonly>); handle(ctx: C): Promise; consume(...args: Parameters>): Promise; reset(...args: Parameters>): Promise; static from(rateLimiters: readonly RateLimiterI[], { bypass }?: HttpRateLimiterOptions): HttpRateLimiter | undefined; } //# sourceMappingURL=rate-limiter-http.d.ts.map