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

Method addError

ark/schema/shared/errors.ts:464–473  ·  view source on GitHub ↗
(error: error)

Source from the content-addressed store, hash-verified

462 }
463
464 override addError<error extends ArkIssue>(error: error): error {
465 if (this.branches.length === 0) {
466 if (this.firstPath === undefined) this.firstPath = error.path
467 else if (this.left || !pathEquals(error.path, this.firstPath)) {
468 this.skip()
469 return error
470 }
471 }
472 return super.addError(error)
473 }
474 }
475 firstPathTraversals.set(Base, FirstPath)
476 return FirstPath

Callers 8

runtime.tsFile · 0.45
skipMethod · 0.45
_atMethod · 0.45
nodeErrorMethod · 0.45
_atMethod · 0.45
errorFromContextFunction · 0.45
errorFromNodeAtFunction · 0.45
errorFromUnionFunction · 0.45

Calls 2

pathEqualsFunction · 0.85
skipMethod · 0.80

Tested by

no test coverage detected