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

Function keepDeclared

ark/aot/settingsValidators.ts:687–693  ·  view source on GitHub ↗
(declared, data, out)

Source from the content-addressed store, hash-verified

685var holdsValue = (checker, data, k) =>
686 checker.u ? data[k] !== void 0 : k in data
687var keepDeclared = (declared, data, out) => {
688 if (out !== data) {
689 for (const k in declared)
690 if (!hasOwn(out, k) && hasOwn(data, k)) setOwnValue(out, k, data[k])
691 }
692 return out
693}
694var writtenProps = (declared, changing, data) => {
695 let out = data
696 for (const k in changing) {

Callers 4

writtenPropsFunction · 0.70
writtenValuesFunction · 0.70
deletesFunction · 0.70
sitedKeepsFunction · 0.70

Calls 2

hasOwnFunction · 0.70
setOwnValueFunction · 0.70

Tested by

no test coverage detected