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

Function writeHolds

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

Source from the content-addressed store, hash-verified

718
719// whether a key a default writes holds a value
720const writeHolds = (prop: Prop.Node): string =>
721 prop.is("optional") && prop.defaultsUndefined ?
722 `data${writeAccess(prop.key as string)} !== void 0`
723 : `${JSON.stringify(prop.key)} in data`
724
725// the keys data holds in arktype's order; a default written by a function holds
726// its key's place until each transform has run

Callers 2

writeSitedWriteFunction · 0.85
writeSitedKeepFunction · 0.85

Calls 2

writeAccessFunction · 0.85
isMethod · 0.80

Tested by

no test coverage detected