> For the complete documentation index, see [llms.txt](https://structure.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://structure.js.org/coercion.md).

# Coercion

Structure does type coercion based on the declared [schema](/schema-concept.md), let's break it into 3 categories:

* [Primitive type coercion](/coercion/primitive-type-coercion.md)
* [Arrays coercion](/coercion/arrays-and-array-subclasses.md)
* [Generic coercion](/coercion/generic-coercion.md)

## Observations

Structure **never** coerces the following scenarios:

* value is `undefined`;
* value is `null` when `nullable` option is enabled;
* value is already of the declared type (except for arrays, we'll talk more about this soon).
