ObservableMap<K, V> Class

A standard Map<K,V> that emits an event when its contents change.

Extends

  • Map<K, V>

Methods

Name Description
constructor<K, V>(elements?: Iterable<, any, any>): ObservableMap<K, V> Construct a new ObservableMap.  
_clear(): void Protected Invoked by clear.  
_delete(key: K): boolean Protected Invoked by delete and deleteAll.  
_set(key: K, value: V): this Protected Invoked by set and setAll.  
clear(): void If this map is not already empty, invokes Map.clear  
delete(key: K): boolean Invokes Map.delete, raising  
deleteAll(keys: Iterable<K>): number Delete multiple keys from the map, raising onChanged only once after all keys are deleted.  
set(key: K, value: V): this Invokes Map.set, raising  
setAll(items: Iterable<>): void Add or update multiple entries in the map, raising onChanged only once after all items are set, if the contents of  

Properties

Name Type Description
onChanged Readonly BeEvent<() => void> Emitted after any change to the contents of this map.  

Defined in

Last Updated: 26 November, 2026