documentation/dsls/DSL-Ash.TypedStruct.md
<!--
This file was generated by Spark. Do not edit it by hand.
-->
# Ash.TypedStruct
## typed_struct
Describe the fields of the struct
### Nested DSLs
* [field](#typed_struct-field)
### typed_struct.field
```elixir
field name, type
```
A field on the struct
### Arguments
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`name`](#typed_struct-field-name){: #typed_struct-field-name .spark-required} | `atom` | | The name of the struct field |
| [`type`](#typed_struct-field-type){: #typed_struct-field-type .spark-required} | `module` | | The type of the struct field |
### Options
| Name | Type | Default | Docs |
|------|------|---------|------|
| [`default`](#typed_struct-field-default){: #typed_struct-field-default } | `any` | | the default value for the field |
| [`description`](#typed_struct-field-description){: #typed_struct-field-description } | `any` | | a description for the field |
| [`constraints`](#typed_struct-field-constraints){: #typed_struct-field-constraints } | `any` | `[]` | Constraints to provide to the type when casting the value. For more, see `Ash.Type`. |
| [`allow_nil?`](#typed_struct-field-allow_nil?){: #typed_struct-field-allow_nil? } | `boolean` | `true` | Whether or not the field can be set to nil. |
### Introspection
Target: `Ash.TypedStruct.Field`
<style type="text/css">.spark-required::after { content: "*"; color: red !important; }</style>