typeListDelete = (transaction, parent, index, length) => {
  if (length === 0) {
    return;
  }

  const startIndex = index;
  const startLength = length;
  const marker = findMarker(parent, index);
  let n = parent._start;

  if (marker !== null) {
    n = marker.p;
    index -= marker.index;
  } // compute the first item to be deleted


  for (; n !== null && index > 0; n = n.right) {
    if (!n.deleted && n.countable) {
      if (index < n.length) {
        getItemCleanStart(transaction, createID(n.id.client, n.id.clock + index));
      }

      index -= n.length;
    }
  } // delete all items until done


  while (length > 0 && n !== null) {
    if (!n.deleted) {
      if (length < n.length) {
        getItemCleanStart(transaction, createID(n.id.client, n.id.clock + length));
      }

      n.delete(transaction);
      length -= n.length;
    }

    n = n.right;
  }

  if (length > 0) {
    throw lengthExceeded;
  }

  if (parent._searchMarker) {
    updateMarkerChanges(parent._searchMarker, startIndex, -startLength + length
    /* in case we remove the above exception */
    );
  }
}
@param {Transaction} transaction
@param {AbstractType<any>} parent
@param {number} index
@param {number} length

@private
@function