/** * Simple in-memory rate limiter with automatic cleanup of expired entries. * * Tracks request counts per key (typically IP address) within a sliding window. * Periodically evicts expired entries to prevent unbounded memory growth. */ export declare class RateLimiter { private readonly limits; private readonly maxPerMinute; private readonly windowMs; private lastCleanup; private static readonly CLEANUP_INTERVAL; constructor(maxPerMinute: number, windowMs?: number); /** Number of tracked entries (for monitoring/testing). */ get size(): number; /** Check if a request from the given key is allowed. */ isAllowed(key: string): boolean; /** Evict expired entries if enough time has passed since last cleanup. */ private maybeCleanup; }