• Queries the map with the given key and updates its associated value with the given producer, but only if the key is present in the map. The map and its entries are unchanged, if the key is not present.

    Returns true if and only if the key is present in the map, implying that its associated value was updated.

    Type Parameters

    Type Parameters

    • K

    • V

    Parameters

    • map: PickMap<K, V, "get" | "has" | "set">

      the map to work with

    • key: K

      the queried key

    • producer: ((existingValue: V) => V)

      a function to update a value, only if it's present

        • (existingValue: V): V
        • Parameters

          • existingValue: V

          Returns V

    Returns boolean

Generated using TypeDoc