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

Function holdsUncompiledWriter

ark/schema/units.ts:405–419  ·  view source on GitHub ↗
(root: BaseRoot)

Source from the content-addressed store, hash-verified

403// root it calls along with its own, so one binding to root or to a root it
404// references would keep that root's transforms from writing in place
405export const holdsUncompiledWriter = (root: BaseRoot): boolean => {
406 const inPlace = $ark.inPlace
407 if (!inPlace || !root.tfs) return false
408 for (const id in root.byId) {
409 const reference = root.byId[id]
410 if (
411 reference.tfs &&
412 reference.isRoot() &&
413 !canJit(reference.$.cfg) &&
414 inPlace.writesInPlace(reference)
415 )
416 return true
417 }
418 return false
419}
420
421// largest roots first, so their units bind the most nodes
422const bindRegisteredUnits = (values: readonly unknown[]): void => {

Callers 2

testCache.tsFile · 0.85
bindRegisteredUnitsFunction · 0.85

Calls 2

canJitFunction · 0.90
writesInPlaceMethod · 0.80

Tested by

no test coverage detected