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

15
docs/values/convert.md Normal file
View File

@@ -0,0 +1,15 @@
[Overview](../overview.md) | [Installation](../installation.md) | [Usage](../usage.md) | [Types](../types/) | **Values** | [Syntax](../syntax/) | [TypeRegistry](../type-registry.md) | [TypeCheck](../type-check.md)
# Convert
Use the Convert function to convert a value into its target type if a reasonable conversion is possible. This function may return an invalid value and should be checked before use. Its return type is `unknown`.
```typescript
const T = Type.Object({ x: Type.Number() });
const R1 = Value.Convert(T, { x: "3.14" }); // const R1 = { x: 3.14 }
const R2 = Value.Convert(T, { x: "not a number" }); // const R2 = { x: 'not a number' }
```
Back to [Home](../../readme.md)