<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.
export function 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<function (type parameter) T in 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>(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
}
deriveOptions: {
readonly order: Order.Order<T>order: import OrderOrder.interface Order<in A>Represents a total ordering for values of type A.
When to use
Use when you need to define how values of a type are compared.
Details
An order returns -1 when the first value is less than the second, 0 when
the values are equal according to this ordering, and 1 when the first value
is greater than the second. It must satisfy total ordering laws: totality,
antisymmetry, and transitivity.
Example (Defining a custom Order)
import { Order } from "effect"
const byAge: Order.Order<{ name: string; age: number }> = (self, that) => {
if (self.age < that.age) return -1
if (self.age > that.age) return 1
return 0
}
const person1 = { name: "Alice", age: 30 }
const person2 = { name: "Bob", age: 25 }
console.log(byAge(person1, person2)) // 1
Order<function (type parameter) T in 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>
readonly annotate?: | ((options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}) => Annotations.Filter)
| undefined
annotate?:
| ((options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options: {
readonly minimum: Tminimum: function (type parameter) T in 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
readonly maximum: Tmaximum: function (type parameter) T in 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
readonly exclusiveMinimum?: boolean | undefinedexclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefinedexclusiveMaximum?: boolean | undefined
}) => Annotations.interface Annotations.FilterAnnotations for filter schema nodes (created via Schema.filter). Extends
Augment
with an optional error message, identifier, and metadata.
Filters are intentionally non-parametric to keep them covariant.
Filter)
| undefined
readonly formatter?: Formatter<T> | undefinedformatter?: interface Formatter<in Value, out Format = string>A callable interface representing a function that converts a Value into a Format, which defaults to string.
When to use
Use when you want to type a formatting or rendering function generically, or when you are building a pipeline that accepts pluggable formatters.
Details
This is a pure callable type and carries no runtime implementation. It is contravariant in Value and covariant in Format.
Example (Defining a custom formatter)
import type { Formatter } from "effect"
const upper: Formatter.Formatter<string> = (s) => s.toUpperCase()
console.log(upper("hello"))
// HELLO
Formatter<function (type parameter) T in 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> | undefined
}) {
const const greaterThanOrEqualTo: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
greaterThanOrEqualTo = import OrderOrder.const isGreaterThanOrEqualTo: <A>(
O: Order<A>
) => {
(that: A): (self: A) => boolean
(self: A, that: A): boolean
}
Checks whether one value is greater than or equal to another according to the given order.
When to use
Use when you need a boolean greater-than-or-equal predicate using an
Order.
Details
Returns true if the order returns 1 or 0, and returns false only if
the order returns -1.
Example (Checking greater-than-or-equal comparisons)
import { Order } from "effect"
const isGreaterThanOrEqualToNumber = Order.isGreaterThanOrEqualTo(Order.Number)
console.log(isGreaterThanOrEqualToNumber(2, 1)) // true
console.log(isGreaterThanOrEqualToNumber(1, 1)) // true
console.log(isGreaterThanOrEqualToNumber(1, 2)) // false
isGreaterThanOrEqualTo(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
}
deriveOptions.order: Order.Order<T>order)
const const greaterThan: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
greaterThan = import OrderOrder.const isGreaterThan: <A>(O: Order<A>) => {
(that: A): (self: A) => boolean
(self: A, that: A): boolean
}
Checks whether one value is strictly greater than another according to the given order.
When to use
Use when you need a boolean greater-than predicate using an Order.
Details
Returns true if the order returns 1, meaning the first value is greater
than the second. Equal or lesser values return false.
Example (Checking greater-than comparisons)
import { Order } from "effect"
const isGreaterThanNumber = Order.isGreaterThan(Order.Number)
console.log(isGreaterThanNumber(2, 1)) // true
console.log(isGreaterThanNumber(1, 2)) // false
console.log(isGreaterThanNumber(1, 1)) // false
isGreaterThan(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
}
deriveOptions.order: Order.Order<T>order)
const const lessThanOrEqualTo: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
lessThanOrEqualTo = import OrderOrder.const isLessThanOrEqualTo: <A>(
O: Order<A>
) => {
(that: A): (self: A) => boolean
(self: A, that: A): boolean
}
Checks whether one value is less than or equal to another according to the given order.
When to use
Use when you need a boolean less-than-or-equal predicate using an Order.
Details
Returns true if the order returns -1 or 0, and returns false only if
the order returns 1.
Example (Checking less-than-or-equal comparisons)
import { Order } from "effect"
const isLessThanOrEqualToNumber = Order.isLessThanOrEqualTo(Order.Number)
console.log(isLessThanOrEqualToNumber(1, 2)) // true
console.log(isLessThanOrEqualToNumber(1, 1)) // true
console.log(isLessThanOrEqualToNumber(2, 1)) // false
isLessThanOrEqualTo(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
}
deriveOptions.order: Order.Order<T>order)
const const lessThan: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
lessThan = import OrderOrder.const isLessThan: <A>(O: Order<A>) => {
(that: A): (self: A) => boolean
(self: A, that: A): boolean
}
Checks whether one value is strictly less than another according to the given order.
When to use
Use when you need a boolean less-than predicate using an Order.
Details
Returns true if the order returns -1, meaning the first value is less
than the second. Equal or greater values return false.
Example (Checking less-than comparisons)
import { Order } from "effect"
const isLessThanNumber = Order.isLessThan(Order.Number)
console.log(isLessThanNumber(1, 2)) // true
console.log(isLessThanNumber(2, 1)) // false
console.log(isLessThanNumber(1, 1)) // false
isLessThan(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
}
deriveOptions.order: Order.Order<T>order)
const const formatter:
| ((
input: unknown,
options?: {
readonly space?:
| number
| string
| undefined
readonly ignoreToString?:
| boolean
| undefined
}
) => string)
| Formatter<T, string>
formatter = 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
}
deriveOptions.formatter?: Formatter<T> | undefinedformatter ?? function format(input: unknown, options?: {
readonly space?: number | string | undefined;
readonly ignoreToString?: boolean | undefined;
}): string
Converts any JavaScript value into a human-readable string.
When to use
Use when you need to format arbitrary JavaScript values for debugging,
logging, or error messages.
Details
- Output is not valid JSON; use
formatJson
when you need
parseable JSON.
- Handles
BigInt, Symbol, Set, Map, Date, RegExp, and class
instances that JSON.stringify cannot represent.
- Circular references are shown as
"[Circular]" instead of throwing.
- Primitives: stringified naturally (
null, undefined, 123, true).
Strings are JSON-quoted.
- Objects with a custom
toString (not Object.prototype.toString):
toString() is called unless ignoreToString is true.
- Errors with a
cause: formatted as "<message> (cause: <cause>)".
- Iterables (
Set, Map, etc.): formatted as
ClassName([...elements]).
- Class instances: wrapped as
ClassName({...}).
Redactable values are automatically redacted.
- Arrays/objects with 0–1 entries are inline; larger ones are
pretty-printed when
space is set.
space — indentation unit (number of spaces, or a string like
"\t"). Defaults to 0 (compact).
ignoreToString — skip calling toString(). Defaults to false.
Example (Formatting compact output)
import { Formatter } from "effect"
console.log(Formatter.format({ a: 1, b: [2, 3] }))
// {"a":1,"b":[2,3]}
Example (Pretty-printed output)
import { Formatter } from "effect"
console.log(Formatter.format({ a: 1, b: [2, 3] }, { space: 2 }))
// {
// "a": 1,
// "b": [
// 2,
// 3
// ]
// }
Example (Handling circular references)
import { Formatter } from "effect"
const obj: any = { name: "loop" }
obj.self = obj
console.log(Formatter.format(obj))
// {"name":"loop","self":[Circular]}
format
return (options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options: {
readonly minimum: Tminimum: function (type parameter) T in 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
readonly maximum: Tmaximum: function (type parameter) T in 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
readonly exclusiveMinimum?: boolean | undefinedexclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefinedexclusiveMaximum?: boolean | undefined
}, annotations: Annotations.Filter | undefinedannotations?: Annotations.interface Annotations.FilterAnnotations for filter schema nodes (created via Schema.filter). Extends
Augment
with an optional error message, identifier, and metadata.
Filters are intentionally non-parametric to keep them covariant.
Filter) => {
const const gte: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
gte = options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.exclusiveMinimum?: boolean | undefinedexclusiveMinimum ? const greaterThan: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
greaterThan : const greaterThanOrEqualTo: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
greaterThanOrEqualTo
const const lte: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
lte = options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.exclusiveMaximum?: boolean | undefinedexclusiveMaximum ? const lessThan: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
lessThan : const lessThanOrEqualTo: {
(that: T): (self: T) => boolean
(self: T, that: T): boolean
}
lessThanOrEqualTo
return const makeFilter: <T>(
filter: (
input: T,
ast: SchemaAST.AST,
options: SchemaAST.ParseOptions
) => FilterOutput,
annotations?: Annotations.Filter | undefined,
abort?: boolean
) => SchemaAST.Filter<T>
Creates a custom validation filter from a predicate function.
Details
The predicate receives the decoded input value, the schema AST, and parse
options, and returns a FilterOutput. Non-success outputs are normalized into
schema issues. The annotations parameter annotates the filter itself; with
the default formatter, failures use message first, expected second, and
<filter> when neither is provided.
When abort is true, parsing stops after this filter fails instead of
collecting later check failures.
Example (Reporting failure at a nested path)
import { Schema } from "effect"
const schema = Schema.Struct({ password: Schema.String, confirmPassword: Schema.String }).check(
Schema.makeFilter((o) =>
o.password === o.confirmPassword
? undefined
: { path: ["password"], issue: "password and confirmPassword must match" }
)
)
console.log(String(Schema.decodeUnknownExit(schema)({ password: "123456", confirmPassword: "1234567" })))
// Failure(Cause([Fail(SchemaError: password and confirmPassword must match
// at ["password"])]))
Example (Reporting multiple failures at once)
import { Schema } from "effect"
const schema = Schema.Struct({ a: Schema.Finite, b: Schema.Finite, c: Schema.Finite }).check(
Schema.makeFilter((o) => {
const issues: Array<Schema.FilterIssue> = []
if (o.a > 0) {
if (o.b <= 0) issues.push({ path: ["b"], issue: "b must be greater than 0" })
if (o.c <= 0) issues.push({ path: ["c"], issue: "c must be greater than 0" })
}
return issues
})
)
console.log(String(Schema.decodeUnknownExit(schema)({ a: 1, b: 0, c: 0 })))
// Failure(Cause([Fail(SchemaError: b must be greater than 0
// at ["b"]
// c must be greater than 0
// at ["c"])]))
makeFilter<function (type parameter) T in 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>(
(input: Tinput) => const gte: (self: T, that: T) => boolean (+1 overload)gte(input: Tinput, options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.minimum: Tminimum) && const lte: (self: T, that: T) => boolean (+1 overload)lte(input: Tinput, options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.maximum: Tmaximum),
{
Annotations.Augment.expected?: string | undefinedHuman-readable description of what a value is expected to satisfy.
Details
For filter and refinement failures, the default formatter uses
message first, then expected, and finally falls back to <filter>.
Use this to name a failed filter in the default message:
Expected <expected>, got <actual>.
expected: `a value between ${const formatter: (value: T) => stringformatter(options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.minimum: Tminimum)}${options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.exclusiveMinimum?: boolean | undefinedexclusiveMinimum ? " (excluded)" : ""} and ${
const formatter: (value: T) => stringformatter(options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.maximum: Tmaximum)
}${options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.exclusiveMaximum?: boolean | undefinedexclusiveMaximum ? " (excluded)" : ""}`,
Annotations.Filter.arbitrary?: Annotations.ToArbitrary.Filter | undefined(property) Annotations.Filter.arbitrary?: {
constraint: { ordered: { exclusiveMaximum?: true | undefined; exclusiveMinimum?: true | undefined; order: Order.Order<T>; minimum: T; maximum: T } };
}
Optional hints used by arbitrary derivation for this filter.
Details
The same annotation can be attached to a single filter or a
FilterGroup. Group hints apply to the same schema node while child
filters are still collected and checked normally.
arbitrary: {
Annotations.ToArbitrary.Filter.constraint?: Annotations.ToArbitrary.GenerationConstraint | undefined(property) Annotations.ToArbitrary.Filter.constraint?: {
ordered: { exclusiveMaximum?: true | undefined; exclusiveMinimum?: true | undefined; order: Order.Order<T>; minimum: T; maximum: T };
}
constraint: {
Annotations.ToArbitrary.GenerationConstraint.ordered?: Annotations.ToArbitrary.OrderedConstraint<any> | undefined(property) Annotations.ToArbitrary.GenerationConstraint.ordered?: {
exclusiveMaximum: true | undefined;
exclusiveMinimum: true | undefined;
order: Order.Order<T>;
minimum: T;
maximum: T;
}
ordered: {
Annotations.ToArbitrary.OrderedConstraint<any>.order: Order.Order<T>order: 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
}
deriveOptions.order: Order.Order<T>order,
Annotations.ToArbitrary.OrderedConstraint<any>.minimum?: anyminimum: options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.minimum: Tminimum,
Annotations.ToArbitrary.OrderedConstraint<any>.maximum?: anymaximum: options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.maximum: Tmaximum,
...(options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.exclusiveMinimum?: boolean | undefinedexclusiveMinimum && { Annotations.ToArbitrary.OrderedConstraint<any>.exclusiveMinimum?: boolean | undefinedexclusiveMinimum: true }),
...(options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options.exclusiveMaximum?: boolean | undefinedexclusiveMaximum && { Annotations.ToArbitrary.OrderedConstraint<any>.exclusiveMaximum?: boolean | undefinedexclusiveMaximum: true })
}
}
},
...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
}
deriveOptions.annotate?: | ((options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}) => Annotations.Filter)
| undefined
annotate?.(options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options),
...annotations: Annotations.Filter | undefinedannotations
}
)
}
}