(
options: {
readonly minimum: bigint
readonly maximum: bigint
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
},
annotations?: Annotations.Filter
): SchemaAST.Filter<bigint>Validates that a BigInt is within a specified range. The range boundaries can be inclusive or exclusive based on the provided options.
Details
Arbitrary:
When generating test data with fast-check, this applies min and max
constraints to ensure generated BigInt values fall within the specified
range.
export const const isBetweenBigInt: (
options: {
readonly minimum: bigint
readonly maximum: bigint
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
},
annotations?: Annotations.Filter
) => SchemaAST.Filter<bigint>
Validates that a BigInt is within a specified range. The range boundaries can
be inclusive or exclusive based on the provided options.
Details
Arbitrary:
When generating test data with fast-check, this applies min and max
constraints to ensure generated BigInt values fall within the specified
range.
isBetweenBigInt = function makeIsBetween<T>(deriveOptions: {
readonly order: Order.Order<T>
readonly annotate?:
| ((options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}) => Annotations.Filter)
| undefined
readonly formatter?: Formatter<T> | undefined
}): (
options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
},
annotations?: Annotations.Filter
) => SchemaAST.Filter<T>
Creates an inclusive or exclusive range check for any ordered type from an
Order.Order instance.
makeIsBetween({
order: Order.Order<bigint>order: import OrderOrder.const BigInt: Order<bigint>Order instance for bigints that compares them numerically.
When to use
Use when you need numeric ordering for bigint values.
Details
Uses standard numeric comparison for bigint values and handles arbitrarily
large integers.
Example (Ordering BigInts)
import { Order } from "effect"
console.log(Order.BigInt(1n, 2n)) // -1
console.log(Order.BigInt(2n, 1n)) // 1
console.log(Order.BigInt(1n, 1n)) // 0
BigInt,
annotate?: | ((options: {
readonly minimum: bigint
readonly maximum: bigint
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}) => Annotations.Filter)
| undefined
annotate: (options: {
readonly minimum: bigint
readonly maximum: bigint
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options) => ({
Annotations.Filter.meta?: Annotations.Meta | undefined(property) Annotations.Filter.meta?: {
minimum: bigint;
maximum: bigint;
exclusiveMinimum: boolean | undefined;
exclusiveMaximum: boolean | undefined;
_tag: 'isBetweenBigInt';
}
Optional metadata used to identify or extend the filter with custom data.
meta: {
_tag: "isBetweenBigInt"_tag: "isBetweenBigInt",
...options: {
readonly minimum: bigint
readonly maximum: bigint
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options
}
})
})