/** * A Map that have a limited size and will remove the oldest items once the max size is reached * @param {number} [limit=Infinity] - The maximum size of the map * @extends Map * @see [MDN Docs]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map} */ declare class LimitedMap extends Map { limit: number; constructor(limit?: number); /** * Adds or updates an element with a specified key and a value * @param {K} key - The key of the element to add or update * @param {V} value - The value of the element to add or update * @returns {any} */ set(key: K, value: V): any; /** * Sorts the map with the provided function * @param fn * @returns {any[]} */ sort(fn: (a: any, b: any) => number): any[]; /** * Returns an array with all keys * @returns {any[]} */ keyArray(): any[]; /** * Returns an array with all values * @returns {any[]} */ valueArray(): any[]; /** * Maps each item to another value into an array * @param fn - Function that produces an element of the new array, taking three arguments * @returns {any[]} */ map(fn: (value: any, index: number, array: any[]) => any): any[]; /** * Returns an array with a random value or N random values * @param {number} [items=1] - The number of values to return * @returns {any|any[]} */ random(items?: number): any | any[]; } export { LimitedMap }; //# sourceMappingURL=LimitedMap.d.ts.map