Branded numeric type for positive 16-bit unsigned integers. Range: [1, 2^16 - 1] or [1, 65,535]
const isPositiveUint16 = (x: number): x is PositiveUint16 => Number.isSafeInteger(x) && x > 0 && x <= 2**16 - 1;const tcpPort = (port: PositiveUint16) => ({ port }); Copy
const isPositiveUint16 = (x: number): x is PositiveUint16 => Number.isSafeInteger(x) && x > 0 && x <= 2**16 - 1;const tcpPort = (port: PositiveUint16) => ({ port });
Branded numeric type for positive 16-bit unsigned integers. Range: [1, 2^16 - 1] or [1, 65,535]