# `Croma.SubtypeOfInt`
[🔗](https://github.com/skirino/croma/blob/main/lib/croma/subtype.ex#L5)

Helper module to define integer-based types.
The following members are generated by `use Croma.SubtypeOfInt`:

- `@type t`
- `@spec valid?(term) :: boolean`

Options:
- `:min` - Minimum value of this type (inclusive).
- `:max` - Maximum value of this type (inclusive).
- `:default` - Default value for this type. Passing this option generates `default/0`.

## Examples
    defmodule MyInt do
      use Croma.SubtypeOfInt, min: 0, max: 10, default: 0
    end

---

*Consult [api-reference.md](api-reference.md) for complete listing*
