Create an unsigned integer type (min=0) with optional max bound.
Shorthand for IntType({ min: 0, max }). Useful for counts, sizes, and other naturally non-negative values.
IntType({ min: 0, max })
Optional
Optional upper bound
Maximum allowed value (inclusive)
const Inventory = ObjectType("Inventory", { itemCount: UIntType(), // 0 to infinity slotIndex: UIntType({ max: 99 }), // 0 to 99, uses 7 bits}); Copy
const Inventory = ObjectType("Inventory", { itemCount: UIntType(), // 0 to infinity slotIndex: UIntType({ max: 99 }), // 0 to 99, uses 7 bits});
Create an unsigned integer type (min=0) with optional max bound.
Shorthand for
IntType({ min: 0, max }). Useful for counts, sizes, and other naturally non-negative values.