Port.ts
Port overview
Table of contents
arbitrary
arbitrary
Generate a random Port.
Signature
export declare const arbitrary: Arbitrary<bigint>Added in v2.0.0
model
Port (type alias)
Type alias for Port representing network port numbers. Valid range is 0-65535 as per standard TCP/UDP port specification.
Signature
export type Port = typeof PortSchema.TypeAdded in v2.0.0
predicates
is
Check if a value is a valid Port.
Signature
export declare const is: (value: unknown) => value is PortAdded in v2.0.0
isDynamic
Check if a port is a dynamic/private port (49152-65535).
Signature
export declare const isDynamic: (port: Port) => booleanAdded in v2.0.0
isRegistered
Check if a port is a registered port (1024-49151).
Signature
export declare const isRegistered: (port: Port) => booleanAdded in v2.0.0
isWellKnown
Check if a port is a well-known port (0-1023).
Signature
export declare const isWellKnown: (port: Port) => booleanAdded in v2.0.0
schemas
PortSchema
Schema for validating port numbers (0-65535).
Signature
export declare const PortSchema: Schema.refine<bigint, typeof Schema.BigInt>Added in v2.0.0