Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Map<K, V>

The counterpart of Daml's DA.Map.Map K V type.

This is an immutable map which compares keys via deep equality. The order of iteration is unspecified; the only guarantee is that the order in keys and values match, i.e. m.get(k) is (deep-, value-based) equal to [...m.values()][[...m.keys()].findIndex((l) => _.isEqual(k, l))]

Type parameters

  • K

    The type of the map keys.

  • V

    The type of the map values.

Hierarchy

  • Map

Index

Methods

  • delete(k: K): Map<K, V>
  • Parameters

    • k: K

    Returns Map<K, V>

  • entries(): Iterator<[K, V], undefined, undefined>
  • Returns Iterator<[K, V], undefined, undefined>

  • entriesArray(): [K, V][]
  • Returns [K, V][]

  • forEach<T, U>(f: (value: V, key: K, map: Map<K, V>) => T, u?: U): void
  • Type parameters

    • T

    • U

    Parameters

    • f: (value: V, key: K, map: Map<K, V>) => T
        • (value: V, key: K, map: Map<K, V>): T
        • Parameters

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

          Returns T

    • Optional u: U

    Returns void

  • get(k: K): undefined | V
  • Parameters

    • k: K

    Returns undefined | V

  • has(k: K): boolean
  • Parameters

    • k: K

    Returns boolean

  • keys(): Iterator<K, undefined, undefined>
  • Returns Iterator<K, undefined, undefined>

  • set(k: K, v: V): Map<K, V>
  • Parameters

    • k: K
    • v: V

    Returns Map<K, V>

  • values(): Iterator<V, undefined, undefined>
  • Returns Iterator<V, undefined, undefined>

Generated using TypeDoc