Decompose monolithic readme into docs/ directory structure

This commit is contained in:
2026-04-23 13:57:56 +00:00
parent 560bb00433
commit f8b2cdd5a4
47 changed files with 1936 additions and 1829 deletions

33
docs/types/options.md Normal file
View File

@@ -0,0 +1,33 @@
[Overview](../overview.md) | [Installation](../installation.md) | [Usage](../usage.md) | **Types** | [Values](../values/) | [Syntax](../syntax/) | [TypeRegistry](../type-registry.md) | [TypeCheck](../type-check.md)
# Options
You can pass Json Schema options on the last argument of any given type. Option hints specific to each type are provided for convenience.
```typescript
// String must be an email
const T = Type.String({
// const T = {
format: "email", // type: 'string',
}); // format: 'email'
// }
// Number must be a multiple of 2
const T = Type.Number({
// const T = {
multipleOf: 2, // type: 'number',
}); // multipleOf: 2
// }
// Array must have at least 5 integer values
const T = Type.Array(Type.Integer(), {
// const T = {
minItems: 5, // type: 'array',
}); // minItems: 5,
// items: {
// type: 'integer'
// }
// }
```
Back to [Home](../../readme.md)