The type of keys in both Maps
The type of values in both Maps
The target Map that will be modified and returned
The source Map whose entries will be merged into the target Map
Optional
mergeFn: ((v1, v2) => V)Optional function to combine values when the same key exists in both Maps. Receives the value from the target Map as the first argument and the value from the source Map as the second argument.
The modified target Map with all entries merged (note: modifies the original Map)
Merges two Maps by adding all entries from the second Map into the first Map. If a key exists in both Maps, either applies a merge function to combine the values or uses the value from the second Map if no merge function is provided.