import { AppContext } from "./app-context.js"; interface MutableLRUParam { evict: (param: LRUParam, newItem: T, map: LRUMap) => boolean; refresh: (param: LRUParam, map: LRUMap) => void; maxEntries: number; maxAge: number; } export type LRUParam = Readonly>; export declare class LRUSet { #private; constructor(param?: Partial>); setParam(param?: Partial>): void; get size(): number; has(key: T): boolean; add(key: T): void; delete(key: T): void; clear(): void; forEach(callbackfn: (value: T, key: T) => void): void; entries(): IterableIterator<[T, T, LRUCtx]>; } export type LRUWithIdx = T & { readonly idx: number; }; export interface LRUCtx { readonly update: boolean; readonly ref: LRUMap; readonly stats: LRUMap["stats"]; readonly item: LRUItem; } export interface LRUItem { readonly value: V; ctx?: AppContext; } export type LRUMapFn = (value: T, key: K, meta: LRUCtx) => void; export type UnregFn = () => void; export declare class LRUMap { private _map; private param; readonly stats: { gets: number; puts: number; deletes: number; }; constructor(c?: Partial>); private _onSetFns; onSet(fn: LRUMapFn): UnregFn; private _onDeleteFns; onDelete(fn: LRUMapFn): UnregFn; private touch; setParam(param?: Partial>): void; keys(): IterableIterator; has(key: K): boolean; get size(): number; getSet(key: K, createFN: (key: K) => Promise): Promise; get(key: K): V | undefined; getItem(key: K): LRUItem | undefined; private buildItem; set(key: K, value: V): void; private buildItemCtx; delete(key: K): void; clear(): void; forEach(fn: (value: V, key: K, ctx: LRUWithIdx>) => void): void; entries(): IterableIterator<[K, V, LRUCtx]>; } export {}; //# sourceMappingURL=lru-map-set.d.ts.map