/** @packageDocumentation * @module Collections */ import { BeEvent } from "./BeEvent"; /** A standard [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) that emits an event when its contents change. * @public */ export declare class ObservableMap extends Map { /** @internal */ get [Symbol.toStringTag](): string; /** Emitted after any change to the contents of this map. */ readonly onChanged: BeEvent<() => void>; /** Construct a new ObservableMap. * @param elements Optional elements with which to populate the new map. */ constructor(elements?: Iterable | undefined); /** Invokes [Map.set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set), raising * the [[onChanged]] event unless `key` is already present with the same `value`. */ set(key: K, value: V): this; /** Invokes [Map.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete), raising * the [[onChanged]] event if the key was removed from the map. */ delete(key: K): boolean; /** If this map is not already empty, invokes [Map.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear) * and raises the [[onChanged]] event. */ clear(): void; /** Add or update multiple entries in the map, raising [[onChanged]] only once after all items are set, if the contents of * the map changed as a result. * This is more efficient than calling [[set]] in a loop when listeners need not be notified of each individual change. * @param items The entries to add or update. */ setAll(items: Iterable): void; /** Delete multiple keys from the map, raising [[onChanged]] only once after all keys are deleted. * This is more efficient than calling [[delete]] in a loop when listeners need not be notified of each individual deletion. * @param keys The keys to delete. * @returns The number of keys that were actually deleted (i.e., were present in the map). */ deleteAll(keys: Iterable): number; } //# sourceMappingURL=ObservableMap.d.ts.map