Skip to content

int

const int: IntPrimitive

Integer primitive. Rejects non-integer input and optionally enforces a range.

Example:

int // any integer
int.min(0) // non-negative
int.min(1).max(100) // bounded range

Throws:

When the raw value fails this primitive’s validation.

Learn: Primitives and builders

Last updated: