@sinclair/typebox 0.30.3 → 0.30.4

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.
@@ -599,10 +599,11 @@ var TypeCompiler;
599
599
  function Compile(schema, references = []) {
600
600
  const generatedCode = Code(schema, references, { language: 'javascript' });
601
601
  const compiledFunction = globalThis.Function('kind', 'format', 'hash', generatedCode);
602
+ const instances = new Map(state.instances);
602
603
  function typeRegistryFunction(kind, instance, value) {
603
- if (!Types.TypeRegistry.Has(kind) || !state.instances.has(instance))
604
+ if (!Types.TypeRegistry.Has(kind) || !instances.has(instance))
604
605
  return false;
605
- const schema = state.instances.get(instance);
606
+ const schema = instances.get(instance);
606
607
  const checkFunc = Types.TypeRegistry.Get(kind);
607
608
  return checkFunc(schema, value);
608
609
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.30.3",
3
+ "version": "0.30.4",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
package/readme.md CHANGED
@@ -110,7 +110,7 @@ License MIT
110
110
  - [Types](#typesystem-types)
111
111
  - [Formats](#typesystem-formats)
112
112
  - [Policies](#typesystem-policies)
113
- - [Transform](#transform)
113
+ - [Workbench](#workbench)
114
114
  - [Ecosystem](#ecosystem)
115
115
  - [Benchmark](#benchmark)
116
116
  - [Compile](#benchmark-compile)
@@ -1516,13 +1516,13 @@ TypeSystem.AllowArrayObjects = true
1516
1516
  TypeSystem.AllowNaN = true
1517
1517
  ```
1518
1518
 
1519
- <a name='transform'></a>
1519
+ <a name='workbench'></a>
1520
1520
 
1521
- ## TypeBox Transform
1521
+ ## TypeBox Workbench
1522
1522
 
1523
1523
  TypeBox offers a small web based code generation tool that can be used to convert TypeScript types into TypeBox types as well as a variety of other runtime type representations.
1524
1524
 
1525
- [TypeBox Transform Link Here](https://sinclairzx81.github.io/typebox-transform/)
1525
+ [TypeBox Workbench Link Here](https://sinclairzx81.github.io/typebox-workbench/)
1526
1526
 
1527
1527
  <a name='ecosystem'></a>
1528
1528