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

Function foundErrors

ark/aot/settingsValidators.ts:300–305  ·  view source on GitHub ↗
(apply, data, onFail, Ctx = Issues)

Source from the content-addressed store, hash-verified

298 )
299}
300var foundErrors = (apply, data, onFail, Ctx = Issues) => {
301 const errors = new Ctx()
302 apply(data, errors)
303 if (!errors._.length) errors._e(data, "predicate", "valid", "is invalid")
304 return onFail ? onFail(errors) : errors
305}
306var mergeIssues = (errors, merged, prefix) => {
307 for (const issue of merged.issues) {
308 errors._.push(

Callers 1

validatorFunction · 0.70

Calls 3

onFailFunction · 0.85
_eMethod · 0.65
applyFunction · 0.50

Tested by

no test coverage detected