## Extended Data Types Lightview provides extended data types that allow you to put additional constraints on variable values. For example: - `number` supports a min, max, step, allowNaN and coercion control - `string` supports minlength, maxlength, pattern (a RegExp), and coercion control. Extended types must be imported from the file `types.js`. To do this, you must make the `mount` function asynchronous and `await` the result of the `import`. Unlike standard data types, coercion is off by default for extended data types, try setting the value to "2". You should see an error message. Then, try adding `coerce:true` to the variable configuration. The error message should go away. Try setting the value to 3. You should get a different error message. Try removing all the configuration options, i.e. use `number({})`. The error message should disappear. Set the value to NaN. This should work. Now add `allowNaN:false`. You should get an error message. *Note*: You will see "@NaN" in the error message. JavaScript does not stringify `NaN`, `-Infinity` or `Infinity` when converting to JSON, so Lightview has to use an unambiguous string representation. Try modifying the type to just `number` without making it a function call. Then assign a number or a string. Try modifying the type to be a `string` and playing with the configuration options and values. Additional extended types and info on how to manage errors can be found in the [API documentation](./api.html).