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

Function flatMessagesByPath

ark/schema/shared/errorReaders.ts:50–57  ·  view source on GitHub ↗
(
	errors: ReadableErrors
)

Source from the content-addressed store, hash-verified

48 * Each path's messages, by the string of the path.
49 */
50export const flatMessagesByPath = (
51 errors: ReadableErrors
52): Record<string, string[]> => {
53 const result: Record<string, string[]> = {}
54 for (const error of errors.issues)
55 addEntry(result, propStringOf(error), error.message)
56 return result
57}
58
59/**
60 * All path strings at which errors are present mapped to the errors occuring

Callers 5

pipe.test.tsFile · 0.90
locale.test.tsFile · 0.90
errors.test.tsFile · 0.90
traverse.test.tsFile · 0.85
label.test.tsFile · 0.85

Calls 2

addEntryFunction · 0.85
propStringOfFunction · 0.85

Tested by

no test coverage detected