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

Function writtenProps

ark/aot/settingsValidators.ts:694–706  ·  view source on GitHub ↗
(declared, changing, data)

Source from the content-addressed store, hash-verified

692 return out
693}
694var writtenProps = (declared, changing, data) => {
695 let out = data
696 for (const k in changing) {
697 const holds = k in data
698 const defaulted = changing[k].d
699 const value = holds ? changing[k].t?.(data[k]) : defaulted?.[0]
700 if (holds ? value !== void 0 && value !== data[k] : defaulted?.length) {
701 if (out === data) out = copyOf(data)
702 setOwnValue(out, k, value)
703 }
704 }
705 return keepDeclared(declared, data, out)
706}
707var isDefaulted = ({ d, w }) => !!(w || d?.length)
708var changingIn = declared => {
709 const changing = {}

Callers 2

sitedPropsFunction · 0.70
fallbackFunction · 0.70

Calls 3

copyOfFunction · 0.70
setOwnValueFunction · 0.70
keepDeclaredFunction · 0.70

Tested by

no test coverage detected