MCPcopy Index your code
hub / github.com/Effect-TS/effect / mergeArrayConstraints

Function mergeArrayConstraints

packages/effect/src/Arbitrary.ts:724–729  ·  view source on GitHub ↗
(c1: ArrayConstraints, c2: ArrayConstraints)

Source from the content-addressed store, hash-verified

722const constArrayConstraints = makeArrayConstraints({})
723
724function mergeArrayConstraints(c1: ArrayConstraints, c2: ArrayConstraints): ArrayConstraints {
725 return makeArrayConstraints({
726 minLength: getMax(c1.constraints.minLength, c2.constraints.minLength),
727 maxLength: getMin(c1.constraints.maxLength, c2.constraints.maxLength)
728 })
729}
730
731function buildArrayConstraints(description: TupleType): ArrayConstraints | undefined {
732 return description.constraints.length === 0

Callers

nothing calls this directly

Calls 3

makeArrayConstraintsFunction · 0.85
getMaxFunction · 0.85
getMinFunction · 0.85

Tested by

no test coverage detected