UNPKG

@obsidize/rx-map

Version:

ES6 Map with rxjs extensions for change detection

23 lines (22 loc) 966 B
/** * ES6 Map implementation that prevents entry mutation outside of explicit set() calls. * This is the default map implementation used by RxMap, so as to prevent iterative / query methods * from passing back raw object refs (which would allow the caller to bypass change detection by direct editing). */ export declare class ImmutableMap<K, V> implements Map<K, V> { protected readonly source: Map<K, V>; constructor(source: Map<K, V>); static standard<K1, V1>(): ImmutableMap<K1, V1>; get size(): number; get [Symbol.toStringTag](): string; [Symbol.iterator](): IterableIterator<[K, V]>; clear(): void; get(key: K): V | undefined; has(key: K): boolean; delete(key: K): boolean; set(key: K, value: V): this; entries(): IterableIterator<[K, V]>; keys(): IterableIterator<K>; values(): IterableIterator<V>; forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void): void; }