js-util

Home > rc-js-util > mapUnion

mapUnion() function

Returns a map with keys from both A and B. If both A and B have the same key the value from B will be used.

Signature:

export declare function mapUnion<TKey, TIem>(a: ReadonlyMap<TKey, TIem>, b: ReadonlyMap<TKey, TIem>): Map<TKey, TIem>;

Parameters

Parameter Type Description
a ReadonlyMap<TKey, TIem>  
b ReadonlyMap<TKey, TIem>  

Returns:

Map<TKey, TIem>

Remarks

See mapUnion().