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

Function unreadErrors

ark/type/runtime.ts:1139–1147  ·  view source on GitHub ↗
(
	apply: CompactApply,
	data: unknown,
	onFail: ArkErrors.Handler | null,
	Ctx: IssuesClass = ArkErrors
)

Source from the content-addressed store, hash-verified

1137// writes its errors' class to find them (findsOnRead), so they're that class
1138// and the bundle holds nothing more for them to wait with
1139export const unreadErrors = (
1140 apply: CompactApply,
1141 data: unknown,
1142 onFail: ArkErrors.Handler | null,
1143 Ctx: IssuesClass = ArkErrors
1144): unknown => {
1145 const errors = new (findsOnRead ? Ctx : unreadOf(Ctx))(data, 0, apply)
1146 return onFail ? onFail(errors) : errors
1147}
1148
1149export const unreadCallErrors = (
1150 apply: CompactApply,

Callers 2

security.test.tsFile · 0.90

Calls 2

unreadOfFunction · 0.85
onFailFunction · 0.85

Tested by

no test coverage detected