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

Function makeArrayConstraints

packages/effect/src/Arbitrary.ts:164–179  ·  view source on GitHub ↗
(options: {
  readonly minLength?: unknown
  readonly maxLength?: unknown
})

Source from the content-addressed store, hash-verified

162
163/** @internal */
164export const makeArrayConstraints = (options: {
165 readonly minLength?: unknown
166 readonly maxLength?: unknown
167}): ArrayConstraints => {
168 const out: Types.Mutable<ArrayConstraints> = {
169 _tag: "ArrayConstraints",
170 constraints: {}
171 }
172 if (Predicate.isNumber(options.minLength)) {
173 out.constraints.minLength = options.minLength
174 }
175 if (Predicate.isNumber(options.maxLength)) {
176 out.constraints.maxLength = options.maxLength
177 }
178 return out
179}
180
181interface DateConstraints {
182 readonly _tag: "DateConstraints"

Callers 2

Arbitrary.tsFile · 0.85
mergeArrayConstraintsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected