@sinclair/typebox 0.24.13 → 0.24.14

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/guard/guard.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as Types from '../typebox';
2
- /** Structural checks for TypeBox types */
2
+ /** TypeGuard tests that values conform to a known TypeBox type specification */
3
3
  export declare namespace TypeGuard {
4
4
  /** Returns true if the given schema is TAny */
5
5
  function TAny(schema: any): schema is Types.TAny;
package/guard/guard.js CHANGED
@@ -29,7 +29,7 @@ THE SOFTWARE.
29
29
  Object.defineProperty(exports, "__esModule", { value: true });
30
30
  exports.TypeGuard = void 0;
31
31
  const Types = require("../typebox");
32
- /** Structural checks for TypeBox types */
32
+ /** TypeGuard tests that values conform to a known TypeBox type specification */
33
33
  var TypeGuard;
34
34
  (function (TypeGuard) {
35
35
  function IsObject(schema) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.24.13",
3
+ "version": "0.24.14",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "json-schema",
package/value/cast.js CHANGED
@@ -32,9 +32,10 @@ const Types = require("../typebox");
32
32
  const create_1 = require("./create");
33
33
  const check_1 = require("./check");
34
34
  // --------------------------------------------------------------------------
35
- // Specialized Union Patch. Because a value can be one of many different
36
- // unions with properties potentially overlapping, we need a strategy
37
- // in which to resolve the appropriate schema to patch from.
35
+ // Specialized Union Cast. Because a union can be one of many varying types
36
+ // with properties potentially overlapping, we need a strategy to determine
37
+ // which of those types we should cast into. This strategy needs to factor
38
+ // the value provided by the user to make this decision.
38
39
  //
39
40
  // The following will score each union type found within the types anyOf
40
41
  // array. Typically this is executed for objects only, so the score is a