ts-type-forge
    Preparing search index...

    Type Alias Uint8

    Uint8: Index<256>

    Represents an unsigned 8-bit integer. A union of integer literals from 0 to 255 (2^8 - 1).

    Useful for representing byte values, color channel values (RGB), or any data that fits within 8 bits of unsigned integer range.

    type RedChannel = Uint8;   // 0-255 for RGB red component
    type ByteValue = Uint8; // Single byte representation

    const isValidUint8 = (value: number): value is Uint8 => {
    return Number.isInteger(value) && value >= 0 && value <= 255;
    };