/** * Gets the value corresponding to the given key. * * @param map - a map * @param key - a key */ export declare function get(map: Map, key: K): V | undefined; /** * Sets the value corresponding to the given key. * * @param map - a map * @param key - a key * @param val - a value */ export declare function set(map: Map, key: K, val: V): void; /** * Removes the item with the given key or all items matching condition. * * @param map - a map * @param conditionOrItem - the key of an item to remove or a condition matching * items to remove */ export declare function remove(map: Map, conditionOrItem: K | ((item: [K, V]) => boolean)): void; /** * Determines if the map contains a value with the given key. * * @param map - a map * @param conditionOrItem - the key of an item to match or a condition matching * items */ export declare function contains(map: Map, conditionOrItem: K | ((item: [K, V]) => boolean)): boolean; /** * Gets the keys of the map. * * @param map - a map */ export declare function keys(map: Map): Set; /** * Gets the values of the map. * * @param map - a map */ export declare function values(map: Map): V[]; /** * Gets the size of the map. * * @param map - a map * @param condition - an optional condition to match */ export declare function size(map: Map, condition?: ((item: [K, V]) => boolean)): number; /** * Determines if the map is empty. * * @param map - a map */ export declare function isEmpty(map: Map): boolean; /** * Returns an iterator for the items of the map. * * @param map - a map * @param condition - an optional condition to match */ export declare function forEach(map: Map, condition?: ((item: [K, V]) => boolean)): Generator<[K, V], void, unknown>; /** * Creates and returns a shallow clone of map. * * @param map - a map */ export declare function clone(map: Map): Map; /** * Returns a new map containing items from the map sorted in ascending * order. * * @param map - a map * @param lessThanAlgo - a function that returns `true` if its first argument * is less than its second argument, and `false` otherwise. */ export declare function sortInAscendingOrder(map: Map, lessThanAlgo: ((itemA: [K, V], itemB: [K, V]) => boolean)): Map; /** * Returns a new map containing items from the map sorted in descending * order. * * @param map - a map * @param lessThanAlgo - a function that returns `true` if its first argument * is less than its second argument, and `false` otherwise. */ export declare function sortInDescendingOrder(map: Map, lessThanAlgo: ((itemA: [K, V], itemB: [K, V]) => boolean)): Map;