json-p3
Version:
JSONPath, JSON Pointer and JSON Patch
11 lines (10 loc) • 316 B
TypeScript
/**
* A Least Recently Used cache, implemented as an extended Map.
*/
export declare class LRUCache<K, V> extends Map<K, V> {
readonly maxSize: number;
constructor(maxSize?: number, entries?: Iterable<[K, V]>);
get(key: K): V | undefined;
set(key: K, value: V): this;
first(): K | undefined;
}