This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

13 lines
374 B
TypeScript

export declare class LruCache<Key, Value> {
readonly maxSize: number;
constructor(maxSize: number, { onDelete }?: {
onDelete?(key: Key, value: Value): void;
});
get(key: Key): Value | undefined;
set(key: Key, value: Value): this;
get firstKey(): Key | undefined;
clear(): void;
keys(): MapIterator<Key>;
delete(key: Key): void;
}