export declare class RateLimiter {
    private limit;
    /** hits[ip] = sorted ascending array of request timestamps within the window */
    private counts;
    /**
     * O(1) LRU tracking via Map insertion-order semantics.
     * Key = ip, value = last-seen timestamp.
     * To promote an entry to MRU: delete it and re-set it (both O(1)).
     * The Map iterator yields entries in insertion order, so the first entry is
     * the least-recently-used — perfect for LRU eviction without any indexOf scan.
     *
     */
    private lruMap;
    private sweepInterval;
    constructor(limit: number);
    /** Returns true if the request is allowed, false if rate-limited. */
    check(ip: string): boolean;
    /** Stop the background sweep interval. Call this when the listener stops. */
    stop(): void;
    /** Evict entries whose last-seen timestamp is older than RATE_TTL_MS. */
    private _sweep;
}
//# sourceMappingURL=rate-limiter.d.ts.map