MCPcopy Index your code
hub / github.com/SplootCode/splootcode / clearAll

Method clearAll

packages/core/src/language/childset.ts:108–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

deserializeChildSetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected