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

Function sitedProps

ark/aot/settingsValidators.ts:759–774  ·  view source on GitHub ↗
(allows, declared, write, walks = props(declared))

Source from the content-addressed store, hash-verified

757 return keepDeclared(declared, data, out)
758}
759var sitedProps = (allows, declared, write, walks = props(declared)) => {
760 const checkers = Object.values(declared)
761 const checker = (data, ctx) =>
762 !objectCheck.test(data) ? !failsAt(ctx, objectCheck, data)
763 : ctx?._e ? walks(data, ctx)
764 : allows(data, checkers)
765 checker.description = objectCheck.description
766 if (write) {
767 const changing = changingIn(declared)
768 const written = sitedKeeps(declared, checkers, write, data =>
769 writtenProps(declared, changing, data)
770 )
771 checker.t = data => written(data)
772 }
773 return checker
774}
775var sited = (allows, declared, write, writes, removed, withCtx) => {
776 const checker = sitedProps(
777 allows,

Callers 2

sitedFunction · 0.85
checkers.tsFile · 0.85

Calls 5

propsFunction · 0.70
changingInFunction · 0.70
sitedKeepsFunction · 0.70
writtenPropsFunction · 0.70
writtenFunction · 0.70

Tested by

no test coverage detected