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

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

- `@type t`
- `@spec valid?(term) :: boolean`
- If any of `:elem_modules` exports `new/1`,
    - `@spec new(term) :: Croma.Result.t(t)`
    - `@spec new!(term) :: t`

Options:
- `:elem_modules` - A list of type modules for tuple elements.
- `:default` - Default value for this type. Passing this option generates `default/0`.

## Examples
    defmodule MyTuple do
      use Croma.SubtypeOfTuple, elem_modules: [MyInt, MyString]
    end

---

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