( min: bigint, max: bigint, annotations?: Annotations.Filter<Schema.Type<S>> )
| 5618 | * @since 3.10.0 |
| 5619 | */ |
| 5620 | export const betweenBigInt = <S extends Schema.Any>( |
| 5621 | min: bigint, |
| 5622 | max: bigint, |
| 5623 | annotations?: Annotations.Filter<Schema.Type<S>> |
| 5624 | ) => |
| 5625 | <A extends bigint>(self: S & Schema<A, Schema.Encoded<S>, Schema.Context<S>>): filter<S> => |
| 5626 | self.pipe( |
| 5627 | filter((a) => a >= min && a <= max, { |
| 5628 | schemaId: BetweenBigIntSchemaId, |
| 5629 | [BetweenBigIntSchemaId]: { min, max }, |
| 5630 | title: `betweenBigInt(${min}, ${max})`, |
| 5631 | description: `a bigint between ${min}n and ${max}n`, |
| 5632 | ...annotations |
| 5633 | }) |
| 5634 | ) |
| 5635 | |
| 5636 | /** |
| 5637 | * @category bigint filters |
no test coverage detected