(options: {
readonly minLength?: unknown
readonly maxLength?: unknown
})
| 162 | |
| 163 | /** @internal */ |
| 164 | export 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 | |
| 181 | interface DateConstraints { |
| 182 | readonly _tag: "DateConstraints" |
no outgoing calls
no test coverage detected
searching dependent graphs…