import { IMap, INumberMap } from "./interfaces"; export function toEs6Map(map: IMap): Map; export function toEs6Map(map: INumberMap): Map; export function toEs6Map(map: IMap): Map { const result = new Map(); for (let field in map) { if (map.hasOwnProperty(field)) { result.set(field, map[field]); } } return result; }