function mergeObjects(obj1, obj2) {
    for (const key in obj2) {
      if (obj2.hasOwnProperty(key)) {
        // @ts-ignore tsc doesn't seem to properly handle types merging
        obj1[key] = obj2[key]
      }
    }
    // @ts-ignore tsc doesn't seem to properly handle types merging
    return obj1
  }
mergeObjects takes all the keys from
obj2 and duplicates them into obj1
@template T1
@template T2
@param {T1} obj1
@param {T2} obj2
@returns {T1 & T2}