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

Function write

ark/schema/shared/traversal.ts:1412–1415  ·  view source on GitHub ↗
(data: Record<PropertyKey, unknown>, v: unknown)

Source from the content-addressed store, hash-verified

1410): Morph<any> => {
1411 const thunk = isThunkInput ? (defaultInput as () => unknown) : undefined
1412 const write = (data: Record<PropertyKey, unknown>, v: unknown) => {
1413 setOwnValue(data, key, v)
1414 return data
1415 }
1416 if (!thunk && !node.alters && !node.hasAlias)
1417 return data => write(data, defaultInput)
1418 if (!node.allowsCtx && !node.ctxMorph) {

Callers 1

computeDefaultValueMorphFunction · 0.70

Calls 1

setOwnValueFunction · 0.90

Tested by

no test coverage detected