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

Function resolving

ark/schema/shared/utils.ts:192–204  ·  view source on GitHub ↗
(resolve: () => t)

Source from the content-addressed store, hash-verified

190}
191
192export const resolving = <t>(resolve: () => t): t => {
193 inProgress.resolutions++
194 let result: t
195 let resolved = false
196 try {
197 result = resolve()
198 resolved = true
199 } finally {
200 leaveResolution(resolved)
201 }
202 assertUnchecked()
203 return result
204}
205
206/**
207 * what a resolution that threw left waiting is discarded with it, where

Callers 5

transformFunction · 0.90
resolvePendingFunction · 0.90
resolveDefinitionFunction · 0.90
parseDefFunction · 0.90
parseReturnedFunction · 0.90

Calls 3

leaveResolutionFunction · 0.85
assertUncheckedFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected