MCPcopy Create free account
hub / github.com/arktypeio/arktype / onChange

Method onChange

ark/schema/structure/structure.ts:1191–1196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1189 const { key, optional } = prop
1190 const keyExpr = js.serialize(key)
1191 const onChange = () => {
1192 this.jsCopy(js, { first: i === 0 }).line(
1193 jsSetOwnProp(js, "out", key, `transformed${i}`)
1194 )
1195 if (once) this.jsDeclaredCopy(js, [key])
1196 }
1197 js.const(`value${i}`, `data${js.prop(key)}`).tfKey(
1198 `transformed${i}`,
1199 `value${i}`,

Callers 1

onChangeFunction · 0.80

Calls 4

jsCopyMethod · 0.95
jsDeclaredCopyMethod · 0.95
jsSetOwnPropFunction · 0.85
lineMethod · 0.80

Tested by

no test coverage detected