(items)
| 35 | } as T[]["slice"]; |
| 36 | |
| 37 | const wrapItems = function wrapItems(items) { |
| 38 | return items.map((item) => { |
| 39 | const wrapped = crdtValue(item as any); // TODO |
| 40 | let valueToSet = getYjsValue(wrapped) || wrapped; |
| 41 | if (valueToSet instanceof Box) { |
| 42 | valueToSet = valueToSet.value; |
| 43 | } |
| 44 | if (valueToSet instanceof Y.AbstractType && valueToSet.parent) { |
| 45 | throw new Error("Not supported: reassigning object that already occurs in the tree."); |
| 46 | } |
| 47 | return valueToSet; |
| 48 | }); |
| 49 | }; |
| 50 | |
| 51 | const findIndex = function findIndex() { |
| 52 | return [].findIndex.apply(slice.apply(this), arguments); |
no test coverage detected