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

Method readErrors

ark/aot/usage.ts:484–503  ·  view source on GitHub ↗
(node: Node, parent: Node | null | undefined)

Source from the content-addressed store, hash-verified

482 }
483
484 private readErrors(node: Node, parent: Node | null | undefined): void {
485 if (this.isErrorsTest(parent, node)) return
486 if (
487 parent?.type === "MemberExpression" &&
488 parent.object === node &&
489 !isWriteTarget(parent)
490 ) {
491 const name = memberNameOf(parent)
492 if (name === "count") return
493 if (name === "issues") {
494 this.used.add("issues")
495 return
496 }
497 if (name === "summary") {
498 this.used.add("summary")
499 return
500 }
501 }
502 this.used.add("errors")
503 }
504
505 private isErrorsTest(test: Node | null | undefined, tested: Node): boolean {
506 return (

Callers 1

readResultMethod · 0.95

Calls 4

isErrorsTestMethod · 0.95
isWriteTargetFunction · 0.90
memberNameOfFunction · 0.90
addMethod · 0.45

Tested by

no test coverage detected