@sinclair/typebox 0.24.4 → 0.24.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/readme.md +2 -2
  3. package/typebox.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.24.4",
3
+ "version": "0.24.5",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "json-schema",
package/readme.md CHANGED
@@ -727,7 +727,7 @@ Please refer to the official AJV [documentation](https://ajv.js.org/guide/gettin
727
727
 
728
728
  ### Compiler
729
729
 
730
- TypeBox include a specialized type compiler that can be used as a runtime type checker in absense of a JSON Schema validator. This compiler is optimized for high throughput validation scenarios and generally performs better than AJV for most structural checks. Please note that this compiler is not fully JSON Schema compliant and is limited to TypeBox types only. The `TypeCompiler` contains a `Compile(T)` function that returns a `TypeCheck<T>` object that can be used to test the validity of a value as well as obtain errors.
730
+ TypeBox includes a specialized type compiler that can be used as a runtime type checker in absense of a JSON Schema validator. This compiler is optimized for high throughput validation scenarios and generally performs better than AJV for most structural checks. Please note that this compiler is not fully JSON Schema compliant and is limited to TypeBox types only. The `TypeCompiler` contains a `Compile(T)` function that returns a `TypeCheck<T>` object that can be used to test the validity of a value as well as obtain errors.
731
731
 
732
732
  ```typescript
733
733
  import { TypeCompiler } from '@sinclair/typebox/compiler'
@@ -783,4 +783,4 @@ console.log(C.Code())
783
783
 
784
784
  ### Contribute
785
785
 
786
- TypeBox is open to community contribution, however please ensure you submit an open issue before submitting your pull request. The TypeBox project does preference open community discussion prior to accepting new features.
786
+ TypeBox is open to community contribution, however please ensure you submit an open issue before submitting your pull request. The TypeBox project does preference open community discussion prior to accepting new features.
package/typebox.js CHANGED
@@ -107,7 +107,6 @@ class TypeBuilder {
107
107
  const properties = {};
108
108
  for (const object of objects) {
109
109
  for (const [key, schema] of Object.entries(object.properties)) {
110
- delete schema[exports.Modifier];
111
110
  properties[key] = properties[key] === undefined ? schema : { [exports.Kind]: 'Union', anyOf: [properties[key], { ...schema }] };
112
111
  }
113
112
  }