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

Method isErrorsTest

ark/aot/usage.ts:505–512  ·  view source on GitHub ↗
(test: Node | null | undefined, tested: Node)

Source from the content-addressed store, hash-verified

503 }
504
505 private isErrorsTest(test: Node | null | undefined, tested: Node): boolean {
506 return (
507 test?.type === "BinaryExpression" &&
508 test.operator === "instanceof" &&
509 test.left === tested &&
510 this.errorsTests.has(test.right)
511 )
512 }
513
514 // e.g. `data` in `out instanceof type.errors ? out.issues : { data }`, or
515 // anywhere after `if (out instanceof type.errors) return out.issues`

Callers 2

readErrorsMethod · 0.95
testsMethod · 0.95

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected