public export class MapExtensions { remarks param targetMap param sourceMap public static mergeFromMap < K , V > ( targetMap , sourceMap ) { for ( const pair of sourceMap . entries ( ) ) { targetMap . set ( pair [ 0 ] , pair [ 1 ] ) ; } } remarks param map public static toObject < TValue > ( map ) { const object = { } ; for ( const [ key , value ] of map . entries ( ) ) { object [ key ] = value ; } return object ; } }