Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImmutableMap<K, V>

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).

Type parameters

  • K

  • V

Hierarchy

  • ImmutableMap

Implements

  • Map<K, V>

Index

Constructors

constructor

  • new ImmutableMap<K, V>(source: Map<K, V>): ImmutableMap<K, V>

Properties

Protected Readonly source

source: Map<K, V>

Accessors

[Symbol.toStringTag]

  • get [Symbol.toStringTag](): string

size

  • get size(): number

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<[K, V]>

clear

  • clear(): void

delete

  • delete(key: K): boolean

entries

  • entries(): IterableIterator<[K, V]>

forEach

  • forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void): void
  • Parameters

    • callbackfn: (value: V, key: K, map: Map<K, V>) => void
        • (value: V, key: K, map: Map<K, V>): void
        • Parameters

          • value: V
          • key: K
          • map: Map<K, V>

          Returns void

    Returns void

get

  • get(key: K): undefined | V

has

  • has(key: K): boolean

keys

  • keys(): IterableIterator<K>

set

values

  • values(): IterableIterator<V>

Static standard

Generated using TypeDoc