Ensure
Type-based input validation
Validators
A Validator
is a type that validates an input. You can create a Validator
like so:
There are tons of built-in validators. You can combine them using various operations:
Dependent Types
A DependentType
is a type that represents a value. Several are provided for some builtin types:
You can create a custom DependentType
by implementing the protocol: