Represents an unsigned 8-bit integer. A union of integer literals from 0 to 255 (2^8 - 1).
0
255
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 componenttype ByteValue = Uint8; // Single byte representationconst isValidUint8 = (value: number): value is Uint8 => { return Number.isInteger(value) && value >= 0 && value <= 255;}; Copy
type RedChannel = Uint8; // 0-255 for RGB red componenttype ByteValue = Uint8; // Single byte representationconst isValidUint8 = (value: number): value is Uint8 => { return Number.isInteger(value) && value >= 0 && value <= 255;};
Represents an unsigned 8-bit integer. A union of integer literals from
0to255(2^8 - 1).Useful for representing byte values, color channel values (RGB), or any data that fits within 8 bits of unsigned integer range.