Schema.IntSchema for port numbers (integers in 1–65535).
When to use
Use when you need the reusable port schema value for Config.schema with
custom paths.
export const const Port: Schema.Intconst Port: {
Rebuild: Int;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.Int;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.Int;
check: (checks_0: SchemaAST.Check<number>, ...checks: Array<SchemaAST.Check<number>>) => Schema.Int;
rebuild: (ast: SchemaAST.Number) => Schema.Int;
make: (input: number, options?: MakeOptions) => number;
makeOption: (input: number, options?: MakeOptions) => Option_.Option<number>;
makeEffect: (input: number, options?: MakeOptions) => Effect.Effect<number, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Schema for port numbers (integers in 1–65535).
When to use
Use when you need the reusable port schema value for Config.schema with
custom paths.
Port = import SchemaSchema.const Int: Intconst Int: {
Rebuild: Int;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.Int;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.Int;
check: (checks_0: SchemaAST.Check<number>, ...checks: Array<SchemaAST.Check<number>>) => Schema.Int;
rebuild: (ast: SchemaAST.Number) => Schema.Int;
make: (input: number, options?: MakeOptions) => number;
makeOption: (input: number, options?: MakeOptions) => Option_.Option<number>;
makeEffect: (input: number, options?: MakeOptions) => Effect.Effect<number, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Int
.
Schema for integers, rejecting NaN, Infinity, and -Infinity.
Int.Bottom<number, number, never, never, Number, Number, number, number, readonly [], number, "readonly", "required", "no-default", "readonly", "required">.check(checks_0: SchemaAST.Check<number>, ...checks: SchemaAST.Check<number>[]): Schema.Intcheck(import SchemaSchema.const isBetween: (
options: {
readonly minimum: number
readonly maximum: number
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
},
annotations?: Schema.Annotations.Filter
) => SchemaAST.Filter<number>
Validates that a number is within a specified range. The range boundaries can
be inclusive or exclusive based on the provided options.
Details
JSON Schema:
This check corresponds to minimum/maximum or exclusiveMinimum/exclusiveMaximum
constraints in JSON Schema, depending on the options provided.
Arbitrary:
When generating test data with fast-check, this applies minimum and
maximum constraints with optional exclusiveMinimum and
exclusiveMaximum flags to ensure generated numbers fall within the
specified range.
isBetween({ minimum: numberminimum: 1, maximum: numbermaximum: 65535 }))