all YArray.tests type fixes

This commit is contained in:
Kevin Jahns
2019-04-03 02:30:44 +02:00
parent e23582b1cd
commit 415de1cc4c
17 changed files with 383 additions and 180 deletions

View File

@@ -37,6 +37,17 @@ export class ItemDeleted extends AbstractItem {
copy (id, left, right, parent, parentSub) {
return new ItemDeleted(id, left, right, parent, parentSub, this.length)
}
/**
* @param {ItemDeleted} right
* @return {boolean}
*/
mergeWith (right) {
if (right.origin === this && this.right === right) {
this.length += right.length
return true
}
return false
}
/**
* @param {encoding.Encoder} encoder
* @param {number} offset