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

Function writes

ark/schema/shared/inPlace.ts:214–218  ·  view source on GitHub ↗
(node: BaseNode)

Source from the content-addressed store, hash-verified

212// a key two constraints transform, each reading the value as it received it
213const transformsKeyTwice = (structure: StructureNode): boolean => {
214 const writes = (node: BaseNode) =>
215 node.hasAlias ||
216 node.references.some(
217 reference => reference.is("structure") && reference.tfs
218 )
219 const index = structure.index?.filter(index => index.value.tfs) ?? []
220 if (!index.length) return false
221 if (index.length > 1 && index.some(index => writes(index.value))) return true

Callers 1

transformsKeyTwiceFunction · 0.85

Calls 1

isMethod · 0.80

Tested by

no test coverage detected