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

Function missingOf

ark/type/standalone/combinators.ts:493–503  ·  view source on GitHub ↗
(prop: Prop.Node)

Source from the content-addressed store, hash-verified

491// what a missing key fails where props reports it: required's alone, as
492// described, or saying a message configured as a sentence
493const missingOf = (prop: Prop.Node): IssueContext | undefined => {
494 const { m: missing } = issueSiteOf(prop.failSite) as { m?: IssueContext }
495 return (
496 missing &&
497 missing.code === "required" &&
498 isInlineSite(missing) &&
499 (isDescribed(missing) || missing.c)
500 ) ?
501 missing
502 : undefined
503}
504
505const missesAsRequired = (prop: Prop.Node): boolean =>
506 missingOf(prop) !== undefined

Callers 2

missesAsRequiredFunction · 0.70
writeRequiredFunction · 0.70

Calls 3

issueSiteOfFunction · 0.90
isInlineSiteFunction · 0.90
isDescribedFunction · 0.90

Tested by

no test coverage detected