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

Function isDefaultDescription

ark/schema/shared/render.ts:228–241  ·  view source on GitHub ↗
(
	error: ArkError,
	description: string
)

Source from the content-addressed store, hash-verified

226
227// whether description is arktype's default for the node
228const isDefaultDescription = (
229 error: ArkError,
230 description: string
231): boolean => {
232 const meta = error.meta
233 return (
234 meta !== undefined &&
235 meta.description === undefined &&
236 meta.keyword === undefined &&
237 description ===
238 // en has a fragment for every code
239 writeExpected(error, defaultLocale[error.code]!.expected!, defaultLocale)
240 )
241}
242
243const normalizedLocales = new WeakMap<object, Locale.Resolved>()
244

Callers 1

citesDescriptionFunction · 0.85

Calls 1

writeExpectedFunction · 0.85

Tested by

no test coverage detected