Fundamentals
    Preparing search index...

    Class ValueMap<TKey, TValue>

    Represents a map that compares object keys by value.

    Type Parameters

    • TKey
    • TValue
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Gets an iterator over all key-value entries in insertion order.

      Returns IterableIterator<[TKey, TValue]>

      Iterator for the map entries.

    • Gets the value associated with the provided key.

      Parameters

      • key: TKey

        Key to look up.

      Returns TValue | undefined

      The matching value, or undefined when no entry matches.

    • Adds a new entry or updates an existing entry for the provided key.

      Parameters

      • key: TKey

        Key to add or update.

      • value: TValue

        Value to associate with the key.

      Returns this

      The current map instance for chaining.