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

Function fallback

ark/schema/shared/rootApply.ts:59–66  ·  view source on GitHub ↗
(body: typeof js)

Source from the content-addressed store, hash-verified

57 const handler =
58 refOf ? "onFail" : "onFail === undefined ? node.onFail : onFail"
59 const fallback = (body: typeof js) =>
60 node.hasAlias ?
61 body.return(
62 `${ref("applyCyclic")}(node, data, ${newCtx}).fin(${handler})`
63 )
64 : body.return(
65 `${ref("applyRejected")}(node, data, ${ref("config")}, ${handler}, ${ref("Traversal")})`
66 )
67 const returnResult = () =>
68 node.hasMorph ?
69 js

Callers 1

rootApplyPartsFunction · 0.70

Calls 2

returnMethod · 0.80
refFunction · 0.70

Tested by

no test coverage detected