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

Function writtenIn

ark/schema/shared/errors.ts:1455–1462  ·  view source on GitHub ↗
(error: ArkError, locale: Locale.Resolved)

Source from the content-addressed store, hash-verified

1453 `Expected a Locale object like \`de\` from "arktype/locales/de" (was ${printable(locale)})`
1454
1455const writtenIn = (error: ArkError, locale: Locale.Resolved): ArkError => {
1456 const config = configOf(error)
1457 if (!renderer && locale !== config.locale)
1458 return throwError(unrenderedLocaleMessage)
1459 const copy = unwrittenError(error)
1460 writeError(copy, config, locale)
1461 return copy
1462}
1463
1464export const unwrittenError = (
1465 error: ArkError,

Callers 2

summaryInMethod · 0.70
messageInFunction · 0.70

Calls 4

throwErrorFunction · 0.90
unwrittenErrorFunction · 0.85
writeErrorFunction · 0.85
configOfFunction · 0.70

Tested by

no test coverage detected