@sinclair/typebox 0.28.10 → 0.28.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.28.10",
3
+ "version": "0.28.11",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
package/typebox.js CHANGED
@@ -621,6 +621,14 @@ var ExtendsUndefined;
621
621
  function Check(schema) {
622
622
  if (schema[exports.Kind] === 'Undefined')
623
623
  return true;
624
+ if (schema[exports.Kind] === 'Not') {
625
+ const not = schema;
626
+ return Check(not.allOf[1]);
627
+ }
628
+ if (schema[exports.Kind] === 'Intersect') {
629
+ const intersect = schema;
630
+ return intersect.allOf.every((schema) => Check(schema));
631
+ }
624
632
  if (schema[exports.Kind] === 'Union') {
625
633
  const union = schema;
626
634
  return union.anyOf.some((schema) => Check(schema));
package/value/check.js CHANGED
@@ -254,8 +254,8 @@ var ValueCheck;
254
254
  if (!Visit(property, references, value[knownKey])) {
255
255
  return false;
256
256
  }
257
- if (Types.ExtendsUndefined.Check(property)) {
258
- return knownKey in value;
257
+ if (Types.ExtendsUndefined.Check(property) && !(knownKey in value)) {
258
+ return false;
259
259
  }
260
260
  }
261
261
  else {