expand (other) {
    if (other.isNull()) return this

    // if the other is a ContainerSelection
    // we delegate to that implementation as it is more complex
    // and can deal with PropertySelections, too
    if (other.isContainerSelection()) {
      return other.expand(this)
    }
    if (!isArrayEqual(this.path, other.path)) {
      throw new Error('Can not expand PropertySelection to a different property.')
    }
    var newStartOffset = Math.min(this.start.offset, other.start.offset)
    var newEndOffset = Math.max(this.end.offset, other.end.offset)
    return this.createWithNewRange(newStartOffset, newEndOffset)
  }
Expands selection to include another selection.

@param {Selection} other
@returns {Selection} a new selection