ts-type-forge
    Preparing search index...

    Type Alias PositiveUint16

    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 });