Skip to content


The collections module provides typings and classes related to working with dictionaries.


Interface used to described an object with string keys corresponding to values of type T

export interface TypedHash<T> {
    [key: string]: T;


Converts a plain object to a Map instance

const map = objectToMap({ a: "b", c: "d"});


Merges two or more maps, overwriting values with the same key. Last value in wins.

const m1 = new Map();
const m2 = new Map();
const m3 = new Map();
const m4 = new Map();

const m = mergeMaps(m1, m2, m3, m4);