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

Function writesSoundly

ark/schema/shared/inPlace.ts:242–250  ·  view source on GitHub ↗
(places: Map<string, Place>)

Source from the content-addressed store, hash-verified

240}
241
242const writesSoundly = (places: Map<string, Place>): boolean => {
243 for (const { node } of places.values()) {
244 // each joined branch transforms data as the union received it
245 if (node.is("union") && node.keepsAny) return false
246 const structure = node.is("intersection") ? node.structure : undefined
247 if (structure && transformsKeyTwice(structure)) return false
248 }
249 return true
250}
251
252const writesUnread = (places: Map<string, Place>): boolean => {
253 const readers: [Place, Reads][] = []

Callers 1

writesInPlaceFunction · 0.85

Calls 2

transformsKeyTwiceFunction · 0.85
isMethod · 0.80

Tested by

no test coverage detected