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

Implemented by

Index

Properties

delete

delete: (k: K) => Map<K, V>

Type declaration

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

      • k: K

      Returns Map<K, V>

entries

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

Type declaration

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

entriesArray

entriesArray: () => [K, V][]

Type declaration

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

forEach

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

Type declaration

    • <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

get: (k: K) => V | undefined

Type declaration

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

      • k: K

      Returns V | undefined

has

has: (k: K) => boolean

Type declaration

    • (k: K): boolean
    • Parameters

      • k: K

      Returns boolean

keys

keys: () => Iterator<K, undefined, undefined>

Type declaration

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

set

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

Type declaration

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

      • k: K
      • v: V

      Returns Map<K, V>

values

values: () => Iterator<V, undefined, undefined>

Type declaration

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

Generated using TypeDoc