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

Function tryJit

ark/schema/shared/compile.ts:72–80  ·  view source on GitHub ↗
(jit: () => result)

Source from the content-addressed store, hash-verified

70 !config.jitless && !refusesJit
71
72export const tryJit = <result>(jit: () => result): result | undefined => {
73 if (refusesJit) return
74 try {
75 return jit()
76 } catch (e) {
77 if (!(e instanceof EvalError)) throw e
78 refusesJit = true
79 }
80}
81
82export type CoercibleValue = string | number | boolean | null | undefined
83

Callers 4

initRootApplyFunction · 0.90
exportFunction · 0.90
jitFunction · 0.90
compile.tsFile · 0.85

Calls 1

jitFunction · 0.85

Tested by

no test coverage detected