This commit is contained in:
sinclair
2025-12-24 15:44:34 +09:00
commit 13d553220c
1047 changed files with 80931 additions and 0 deletions

17
changelog/0.20.0.md Normal file
View File

@@ -0,0 +1,17 @@
## [0.20.0](https://www.npmjs.com/package/@sinclair/typebox/v/0.20.0)
Updates:
- Function `Type.Rec(...)` signature change.
- Minor documentation updates.
Notes:
The `Type.Rec(...)` function signature has been changed to allow passing the `$id` as a custom option. This is to align `Type.Rec(...)` with other functions that accept `$id` as an option. `Type.Rec(...)` can work with or without an explicit `$id`, but it is recommend to specify one if the recursive type is nested in an outer schema.
```typescript
const Node = Type.Rec(Self => Type.Object({
id: Type.String(),
nodes: Type.Array(Self)
}), { $id: 'Node' })
```