/** * Type of the key used in the LRU. * * @public */ export type Key = string | number; /** * Cache evicts the least-recently-used key when capacity is exceeded. * * @public */ export declare class LRU { private readonly storage; private readonly root; private readonly capacity; constructor(capacity?: number); /** * Number of items in the LRU. */ size(): number; /** * Get the value associated with the key and move the * key to the front of the LRU. */ get(key: Key): V | undefined; /** * Set a value associated with the key. IF it already * exists, the value is updated. Otherwise it is inserted * into the LRU and moved to the front. */ set(key: Key, val: V): void; /** * Show the contents of the LRU as a string. */ toString(): string; private moveFront; private insert; private remove; }