/**
 * Simple in-memory sliding window rate limiter.
 */
interface RateLimiterOptions {
    windowMs: number;
    maxRequests: number;
    maxKeys?: number;
    sweepIntervalMs?: number;
}
interface RateCheckResult {
    allowed: boolean;
    retryAfterMs: number;
}
export declare class RateLimiter {
    private windowMs;
    private maxRequests;
    private maxKeys;
    private hits;
    private sweepTimer;
    constructor(opts: RateLimiterOptions);
    check(key: string): RateCheckResult;
    /** Remove keys with no hits within the current window */
    private sweep;
    /** Stop the background sweep timer */
    destroy(): void;
}
export {};
