( minimum: number, maximum: number, annotations?: Annotations.Filter<Schema.Type<S>> )
| 5198 | * @since 3.10.0 |
| 5199 | */ |
| 5200 | export const between = <S extends Schema.Any>( |
| 5201 | minimum: number, |
| 5202 | maximum: number, |
| 5203 | annotations?: Annotations.Filter<Schema.Type<S>> |
| 5204 | ) => |
| 5205 | <A extends number>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): filter<S> => |
| 5206 | self.pipe( |
| 5207 | filter((a) => a >= minimum && a <= maximum, { |
| 5208 | schemaId: BetweenSchemaId, |
| 5209 | title: `between(${minimum}, ${maximum})`, |
| 5210 | description: `a number between ${minimum} and ${maximum}`, |
| 5211 | jsonSchema: { minimum, maximum }, |
| 5212 | ...annotations |
| 5213 | }) |
| 5214 | ) |
| 5215 | |
| 5216 | /** |
| 5217 | * @category schema id |
no test coverage detected