()
| 106 | } |
| 107 | |
| 108 | clearAll() { |
| 109 | if (this.enableMutations) { |
| 110 | throw new Error('Cannot use clearAll for childset with mutations enabled.') |
| 111 | } |
| 112 | |
| 113 | for (const child of this.children) { |
| 114 | child.parent = null |
| 115 | } |
| 116 | this.children = [] |
| 117 | } |
| 118 | |
| 119 | removeChild(index: number): SplootNode { |
| 120 | if (index >= this.children.length) { |