ts-type-forge
    Preparing search index...
    Uint16: TSTypeForgeInternals_ExtendNumberBrand<Uint32, "< 2^16" | "< 2^31">

    Branded numeric type for 16-bit unsigned integers. Range: [0, 2^16 - 1] or [0, 65,535]

    const isUint16 = (x: number): x is Uint16 =>
    Number.isSafeInteger(x) && x >= 0 && x <= 2**16 - 1;

    const port = (num: Uint16) => ({ port: num });
    const characterCode = (code: Uint16) => String.fromCharCode(code);