MCPcopy Create free account
hub / github.com/SplootCode/splootcode / setValidity

Method setValidity

packages/core/src/language/node.ts:157–175  ·  view source on GitHub ↗
(isValid: boolean, reason: string, childSet?: string, index?: number)

Source from the content-addressed store, hash-verified

155 }
156
157 setValidity(isValid: boolean, reason: string, childSet?: string, index?: number) {
158 if (
159 this.isValid === isValid &&
160 this.invalidReason === reason &&
161 childSet === this.invalidChildSetID &&
162 index === this.invalidChildIndex
163 ) {
164 return
165 }
166 this.isValid = isValid
167 this.invalidReason = reason
168 this.invalidChildSetID = childSet
169 this.invalidChildIndex = index
170 const mutation = new NodeMutation()
171 mutation.node = this
172 mutation.type = NodeMutationType.SET_VALIDITY
173 mutation.validity = { valid: isValid, reason: reason, childset: childSet, index: index }
174 this.fireMutation(mutation)
175 }
176
177 selectRuntimeCaptureFrame(index: number) {
178 console.warn(`Capture frames not supported for node type ${this.type}`)

Callers 15

validateSelfMethod · 0.80
validateSelfMethod · 0.80
validateSelfMethod · 0.80
validateSelfMethod · 0.80
validateSelfMethod · 0.80
validateSelfMethod · 0.80
validateSelfMethod · 0.80
allowEmptyMethod · 0.80
requireNonEmptyMethod · 0.80
validateSelfMethod · 0.80
validateSelfMethod · 0.80

Calls 1

fireMutationMethod · 0.95

Tested by

no test coverage detected