/**
 * A simple LRU (Least Recently Used) cache implementation.
 *
 * Uses Map's insertion order to track access recency. When the cache
 * exceeds maxSize, the oldest (least recently used) entry is evicted.
 */
declare class LRUCache<K, V> {
    readonly maxSize: number;
    private readonly _cache;
    /**
     * Creates an LRU cache with the specified maximum size.
     *
     * @throws {Error} If maxSize is not a positive integer
     */
    constructor(maxSize: number);
    /** Gets a value from the cache and marks it as recently used. */
    get(key: K): V | undefined;
    /**
     * Sets a value in the cache, evicting the oldest entry if at capacity.
     *
     * If the key already exists, it is updated and marked as recently used.
     */
    set(key: K, value: V): LRUCache<K, V>;
    /**
     * Checks if a key exists in the cache.
     *
     * Note: This does NOT update the access order (use get() for that).
     */
    has(key: K): boolean;
    /** Deletes an entry from the cache. */
    delete(key: K): boolean;
    /** Clears all entries from the cache. */
    clear(): void;
    /** Gets the current number of entries in the cache. */
    get size(): number;
}
export default LRUCache;
