message: ts: better type in hashMap.
diff: @@ -660,7 +660,7 @@ export class HashMap<T, KEY extends string | number = string | number> {
  data: {[key in KEY]: T} = {} as {[key in KEY]: T};
  - constructor(obj?: HashMap<T, KEY> | Dictionary<T> | any[]) {
  + constructor(obj?: HashMap<T, KEY> | { [key in KEY]?: T } | KEY[]) {
  const isArr = isArray(obj);
  // Key should not be set on this, otherwise
  // methods get/set/... may be overrided.
  @@ -682,7 +682,7 @@ export class HashMap<T, KEY extends string | number = string | number> {
  get(key: KEY): T {
  return this.data.hasOwnProperty(key) ? this.data[key] : null;
  }
  - set(key: KEY, value: T) {
  + set(key: KEY, value: T): T {
  // Comparing with invocation chaining, `return value` is more commonly
  // used in this case: `const someVal = map.set('a', genVal());`
  return (this.data[key] = value);
  @@ -709,7 +709,7 @@ export class HashMap<T, KEY extends string | number = string | number> {
  }
  export function createHashMap<T, KEY extends string | number = string | number>(
  - obj?: HashMap<T, KEY> | Dictionary<T> | any[]
  + obj?: HashMap<T, KEY> | { [key in KEY]?: T } | KEY[]
  ) {
  return new HashMap<T, KEY>(obj);
  }
  