Files
typebox/changelog/0.24.0.md
glm-5.1 bd758c2342 Fork from @sinclair/typebox 0.34.49 as @alkdev/typebox
- Rename package from @sinclair/typebox to @alkdev/typebox
- Update author, repository, and homepage to alkdev
- Remove GitHub workflows, .vscode config, and branding assets
- Update all source, test, example, changelog, and task imports
- Update tsconfig.json path mappings
- Clean up readme header (remove upstream badges/branding)
2026-04-23 13:22:31 +00:00

2.1 KiB

0.24.0

Changes:

  • The kind and modifier keywords are now expressed as symbol keys. This change allows AJV to leverage TypeBox schemas directly without explicit configuration of kind and modifier in strict mode.
  • Type.Intersect([...]) now returns a composite TObject instead of a allOf schema representation. This change allows intersected types to be leveraged in calls to Omit, Pick, Partial, Required.
  • Type.Void(...) now generates a { type: null } schema representation. This is principally used for RPC implementations where a RPC target function needs to respond with a serializable value for void return.
  • Type.Rec(...) renamed to Type.Recursive(...) and now supports non-mutual recursive type inference.

Added:

  • Type.Unsafe<T>(...). This type enables custom schema representations whose static type is informed by generic type T.
  • Type.Uint8Array(...). This is a non-standard schema that can be configured on AJV to enable binary buffer range validation.
  • Added optional extended design property on all schema options. This property can be used to specify design time metadata when rendering forms.

Compiler:

  • TypeBox now provides an optional experimental type compiler that can be used to validate types without AJV. This compiler is not a standard JSON schema compiler and will only compile TypeBox's known schema representations. For full JSON schema validation, AJV should still be the preference. This compiler is a work in progress.

Value:

  • TypeBox now provides a value generator that can generate default values from TypeBox types.

Breaking Changes:

  • Type.Intersect(...) is constrained to accept types of TObject only.
  • Type.Namespace(...) has been removed.
  • The types TUnion, TEnum, KeyOf and TLiteral<TString>[] are all now expressed via allOf. For Open API users, Please consider Type.Unsafe() to express enum string union representations. Documentation on using Type.Unsafe() can be found here