mergeDeleteSets = dss => {
  const merged = new DeleteSet();

  for (let dssI = 0; dssI < dss.length; dssI++) {
    dss[dssI].clients.forEach((delsLeft, client) => {
      if (!merged.clients.has(client)) {
        // Write all missing keys from current ds and all following.
        // If merged already contains `client` current ds has already been added.

        /**
         * @type {Array<DeleteItem>}
         */
        const dels = delsLeft.slice();

        for (let i = dssI + 1; i < dss.length; i++) {
          array.appendTo(dels, dss[i].clients.get(client) || []);
        }

        merged.clients.set(client, dels);
      }
    });
  }

  sortAndMergeDeleteSet(merged);
  return merged;
}
@param {Array<DeleteSet>} dss
@return {DeleteSet} A fresh DeleteSet