/** * Least Recently Used (LRU) cache implementation * @template T - Type of cache keys * @template U - Type of cache values */ export declare class LRUCache { readonly maxSize: number; map: Map; keys: T[]; constructor(maxSize?: number); has(k: T): boolean; get(k: T): U | undefined; set(k: T, v: U): void; pop(k: T): U | undefined; } /** * Creates a memoized function with LRU caching * @template T - Cache key type * @template V - Cache value type * @template Args - Function argument types */ export declare function cached({ maxSize, getKey, getValue, }: { maxSize: number; getKey: (args: Args) => T; getValue: (args: Args) => V; }): { (...args: Args): NonNullable; cache: LRUCache; getKey: (args: Args) => T; getValue: (args: Args) => V; pop: (...args: Args) => V; }; /** * Creates a simple memoized function with default settings * @template V - Cache value type * @template Args - Function argument types */ export declare function simpleCache(getValue: (args: Args) => V): { (...args: Args): NonNullable; cache: LRUCache; getKey: (args: Args) => string; getValue: (args: Args) => V; pop: (...args: Args) => V; }; //# sourceMappingURL=LRUCache.d.ts.map