Structure does type coercion based on the declared schema, let's break it into 3 categories:
Primitive type coercion
Arrays coercion
Generic coercion
Structure never coerces the following scenarios:
value is undefined;
undefined
value is null when nullable option is enabled;
null
nullable
value is already of the declared type (except for arrays, we'll talk more about this soon).
Last updated 5 years ago