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

Function withShallowPredicate

ark/sets/fromJsonSchema.ts:458–465  ·  view source on GitHub ↗
(ctx: ReadContext, read: () => t)

Source from the content-addressed store, hash-verified

456}
457
458const withShallowPredicate = <t>(ctx: ReadContext, read: () => t): t => {
459 ctx.inPredicate++
460 try {
461 return read()
462 } finally {
463 ctx.inPredicate--
464 }
465}
466
467const withChildValue = <t>(ctx: ReadContext, read: () => t): t => {
468 const prevShallowRefPredDepth = ctx.shallowRefPredDepth

Callers 2

fromJsonSchema.tsFile · 0.85
readKeyPredicatesFunction · 0.85

Calls 1

readFunction · 0.70

Tested by

no test coverage detected