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

Function fail

ark/schema/scope.ts:763–771  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

761 const component = [ctx]
762 // a deferred check failed; reparsing would reuse checked nodes
763 const fail = (e: unknown) => {
764 for (const failed of component) {
765 failed.phase = "failed"
766 failed.error = e
767 // registered again, so an alias holding what it resolved to throws too
768 nodesById.set(failed.id, failed)
769 failed.$.res[failed.alias!] = failed
770 }
771 }
772 try {
773 const resolved = resolving(() => {
774 // it reaches no definition still open, so its component closes with it

Callers 1

resolveDefinitionFunction · 0.70

Calls 1

setMethod · 0.45

Tested by

no test coverage detected