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

Function pipe

ark/schema/shared/traversal.ts:661–676  ·  view source on GitHub ↗
(ctx, node, data)

Source from the content-addressed store, hash-verified

659 : errorsOf(ctx)
660
661export const pipe: TraversePipe = (ctx, node, data) => {
662 if (!node.hasAlias) return pipeAcyclicOf(node)(ctx, node, data)
663 if (!node.allows(data)) {
664 applyPipedResolution(ctx, node, data)
665 return errorsOf(ctx)
666 }
667 if (!node.tfs) return data
668 // a morph's output can share objects an earlier pass cached
669 const { tfdById, isTree } = ctx
670 ctx.tfdById = undefined
671 ctx.isTree = true
672 const result = transformPiped(ctx, node, data, transform)
673 ctx.tfdById = tfdById
674 ctx.isTree = isTree
675 return result
676}
677
678const allowsPiped = (
679 ctx: InternalTraversal,

Callers

nothing calls this directly

Calls 5

pipeAcyclicOfFunction · 0.85
applyPipedResolutionFunction · 0.85
transformPipedFunction · 0.85
allowsMethod · 0.80
errorsOfFunction · 0.70

Tested by

no test coverage detected