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

Function inputErrors

ark/schema/structure/optional.ts:239–246  ·  view source on GitHub ↗
(node: BaseRoot, value: unknown)

Source from the content-addressed store, hash-verified

237// a default is easily mistaken for a morph's output, so a rejected one reports
238// what its input checks
239const inputErrors = (node: BaseRoot, value: unknown): ArkErrors =>
240 (node.in as BaseRoot)
241 .configure(meta =>
242 meta.description === node.meta.description ?
243 omit(meta, { description: 1 })
244 : meta
245 )
246 .traverseUnused(value) as ArkErrors
247
248export type writeUnassignableDefaultValueMessage<
249 baseDef extends string,

Callers 1

checkDefaultFunction · 0.85

Calls 1

omitFunction · 0.90

Tested by

no test coverage detected