i32
i32(
value):I32Value
Defined in: src/attr/values.ts:80
A 32-bit signed integer, indexed for equality and range queries. This is the default type for a
bare number, so { level: 10 } and { level: i32(10) } are the same attribute.
Parameters
Section titled “Parameters”An integer in [-2147483648, 2147483647].
number | bigint
Returns
Section titled “Returns”Throws
Section titled “Throws”If the value is not an integer, or does not fit an i32.
Example
Section titled “Example”i32(10) // { type: "i32", value: 10 }i32(-42) // negative values are fine — i32 is the signed integer