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

29
docs/values/parse.md Normal file
View File

@@ -0,0 +1,29 @@
[Overview](../overview.md) | [Installation](../installation.md) | [Usage](../usage.md) | [Types](../types/) | **Values** | [Syntax](../syntax/) | [TypeRegistry](../type-registry.md) | [TypeCheck](../type-check.md)
# Parse
Use the Parse function to parse a value. This function calls the `Clone` `Clean`, `Default`, `Convert`, `Assert` and `Decode` Value functions in this exact order to process a value.
```typescript
const R = Value.Parse(Type.String(), "hello"); // const R: string = "hello"
const E = Value.Parse(Type.String(), undefined); // throws AssertError
```
You can override the order in which functions are run, or omit functions entirely using the following.
```typescript
// Runs no functions.
const R = Value.Parse([], Type.String(), 12345);
// Runs the Assert() function.
const E = Value.Parse(["Assert"], Type.String(), 12345);
// Runs the Convert() function followed by the Assert() function.
const S = Value.Parse(["Convert", "Assert"], Type.String(), 12345);
```
Back to [Home](../../readme.md)