MCPcopy
hub / github.com/arktypeio/arktype / writeJsonSyntaxErrorProblem

Function writeJsonSyntaxErrorProblem

ark/type/keywords/string.ts:439–442  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

437const jsonStringDescription = "a JSON string"
438
439export const writeJsonSyntaxErrorProblem = (error: unknown): string => {
440 if (!(error instanceof SyntaxError)) throw error
441 return `must be ${jsonStringDescription} (${error})`
442}
443
444const jsonRoot = rootSchema({
445 meta: jsonStringDescription,

Callers 3

json.test.tsFile · 0.90
string.tsFile · 0.85
parseJsonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…