@sinclair/typebox 0.32.13 → 0.32.15

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 (51) hide show
  1. package/build/import/compiler/index.d.mts +1 -1
  2. package/build/import/compiler/index.mjs +1 -1
  3. package/build/import/errors/index.d.mts +2 -2
  4. package/build/import/errors/index.mjs +2 -2
  5. package/build/import/index.d.mts +69 -69
  6. package/build/import/index.mjs +69 -76
  7. package/build/import/system/index.d.mts +2 -2
  8. package/build/import/system/index.mjs +2 -2
  9. package/build/import/type/clone/index.d.mts +2 -2
  10. package/build/import/type/clone/index.mjs +2 -2
  11. package/build/import/type/const/const.mjs +2 -2
  12. package/build/import/type/object/object.d.mts +1 -1
  13. package/build/import/type/object/object.mjs +1 -1
  14. package/build/import/value/cast/cast.mjs +2 -2
  15. package/build/import/value/clone/clone.mjs +2 -2
  16. package/build/import/value/delta/delta.mjs +3 -3
  17. package/build/import/value/equal/equal.mjs +3 -3
  18. package/build/import/value/guard/guard.d.mts +34 -6
  19. package/build/import/value/guard/guard.mjs +71 -12
  20. package/build/import/value/hash/hash.mjs +2 -2
  21. package/build/import/value/index.d.mts +14 -14
  22. package/build/import/value/index.mjs +18 -18
  23. package/build/import/value/mutate/mutate.mjs +5 -5
  24. package/build/import/value/transform/decode.mjs +4 -4
  25. package/build/import/value/transform/encode.mjs +4 -4
  26. package/build/require/compiler/index.d.ts +1 -1
  27. package/build/require/compiler/index.js +16 -6
  28. package/build/require/errors/index.d.ts +2 -2
  29. package/build/require/errors/index.js +16 -10
  30. package/build/require/index.d.ts +69 -69
  31. package/build/require/index.js +83 -202
  32. package/build/require/system/index.d.ts +2 -2
  33. package/build/require/system/index.js +16 -7
  34. package/build/require/type/clone/index.d.ts +2 -2
  35. package/build/require/type/clone/index.js +16 -3
  36. package/build/require/type/const/const.js +1 -1
  37. package/build/require/type/object/object.d.ts +1 -1
  38. package/build/require/type/object/object.js +1 -2
  39. package/build/require/value/cast/cast.js +1 -1
  40. package/build/require/value/clone/clone.js +1 -1
  41. package/build/require/value/delta/delta.js +2 -2
  42. package/build/require/value/equal/equal.js +2 -2
  43. package/build/require/value/guard/guard.d.ts +34 -6
  44. package/build/require/value/guard/guard.js +89 -16
  45. package/build/require/value/hash/hash.js +1 -1
  46. package/build/require/value/index.d.ts +14 -14
  47. package/build/require/value/index.js +35 -71
  48. package/build/require/value/mutate/mutate.js +4 -4
  49. package/build/require/value/transform/decode.js +3 -3
  50. package/build/require/value/transform/encode.js +3 -3
  51. package/package.json +1 -1
@@ -10,24 +10,87 @@ export function IsIterator(value) {
10
10
  return IsObject(value) && Symbol.iterator in value;
11
11
  }
12
12
  // --------------------------------------------------------------------------
13
- // Nominal
13
+ // Object Instances
14
14
  // --------------------------------------------------------------------------
15
- /** Returns true if this value is a typed array */
16
- export function IsTypedArray(value) {
17
- return ArrayBuffer.isView(value);
15
+ /** Returns true if this value is not an instance of a class */
16
+ export function IsStandardObject(value) {
17
+ return IsObject(value) && !IsArray(value) && IsFunction(value.constructor) && value.constructor.name === 'Object';
18
+ }
19
+ /** Returns true if this value is an instance of a class */
20
+ export function IsInstanceObject(value) {
21
+ return IsObject(value) && !IsArray(value) && IsFunction(value.constructor) && value.constructor.name !== 'Object';
18
22
  }
23
+ // --------------------------------------------------------------------------
24
+ // JavaScript
25
+ // --------------------------------------------------------------------------
19
26
  /** Returns true if this value is a Promise */
20
27
  export function IsPromise(value) {
21
28
  return value instanceof Promise;
22
29
  }
23
- /** Returns true if the value is a Uint8Array */
24
- export function IsUint8Array(value) {
25
- return value instanceof Uint8Array;
26
- }
27
30
  /** Returns true if this value is a Date */
28
31
  export function IsDate(value) {
29
32
  return value instanceof Date && Number.isFinite(value.getTime());
30
33
  }
34
+ /** Returns true if this value is an instance of Map<K, T> */
35
+ export function IsMap(value) {
36
+ return value instanceof globalThis.Map;
37
+ }
38
+ /** Returns true if this value is an instance of Set<T> */
39
+ export function IsSet(value) {
40
+ return value instanceof globalThis.Set;
41
+ }
42
+ /** Returns true if this value is RegExp */
43
+ export function IsRegExp(value) {
44
+ return value instanceof globalThis.RegExp;
45
+ }
46
+ /** Returns true if this value is a typed array */
47
+ export function IsTypedArray(value) {
48
+ return ArrayBuffer.isView(value);
49
+ }
50
+ /** Returns true if the value is a Int8Array */
51
+ export function IsInt8Array(value) {
52
+ return value instanceof globalThis.Int8Array;
53
+ }
54
+ /** Returns true if the value is a Uint8Array */
55
+ export function IsUint8Array(value) {
56
+ return value instanceof globalThis.Uint8Array;
57
+ }
58
+ /** Returns true if the value is a Uint8ClampedArray */
59
+ export function IsUint8ClampedArray(value) {
60
+ return value instanceof globalThis.Uint8ClampedArray;
61
+ }
62
+ /** Returns true if the value is a Int16Array */
63
+ export function IsInt16Array(value) {
64
+ return value instanceof globalThis.Int16Array;
65
+ }
66
+ /** Returns true if the value is a Uint16Array */
67
+ export function IsUint16Array(value) {
68
+ return value instanceof globalThis.Uint16Array;
69
+ }
70
+ /** Returns true if the value is a Int32Array */
71
+ export function IsInt32Array(value) {
72
+ return value instanceof globalThis.Int32Array;
73
+ }
74
+ /** Returns true if the value is a Uint32Array */
75
+ export function IsUint32Array(value) {
76
+ return value instanceof globalThis.Uint32Array;
77
+ }
78
+ /** Returns true if the value is a Float32Array */
79
+ export function IsFloat32Array(value) {
80
+ return value instanceof globalThis.Float32Array;
81
+ }
82
+ /** Returns true if the value is a Float64Array */
83
+ export function IsFloat64Array(value) {
84
+ return value instanceof globalThis.Float64Array;
85
+ }
86
+ /** Returns true if the value is a BigInt64Array */
87
+ export function IsBigInt64Array(value) {
88
+ return value instanceof globalThis.BigInt64Array;
89
+ }
90
+ /** Returns true if the value is a BigUint64Array */
91
+ export function IsBigUint64Array(value) {
92
+ return value instanceof globalThis.BigUint64Array;
93
+ }
31
94
  // --------------------------------------------------------------------------
32
95
  // Standard
33
96
  // --------------------------------------------------------------------------
@@ -35,10 +98,6 @@ export function IsDate(value) {
35
98
  export function HasPropertyKey(value, key) {
36
99
  return key in value;
37
100
  }
38
- /** Returns true if this object is not an instance of any other type */
39
- export function IsPlainObject(value) {
40
- return IsObject(value) && IsFunction(value.constructor) && value.constructor.name === 'Object';
41
- }
42
101
  /** Returns true of this value is an object type */
43
102
  export function IsObject(value) {
44
103
  return value !== null && typeof value === 'object';
@@ -1,4 +1,4 @@
1
- import { IsArray, IsBoolean, IsBigInt, IsDate, IsNull, IsNumber, IsPlainObject, IsString, IsSymbol, IsUint8Array, IsUndefined } from '../guard/index.mjs';
1
+ import { IsArray, IsBoolean, IsBigInt, IsDate, IsNull, IsNumber, IsStandardObject, IsString, IsSymbol, IsUint8Array, IsUndefined } from '../guard/index.mjs';
2
2
  import { TypeBoxError } from '../../type/error/index.mjs';
3
3
  // ------------------------------------------------------------------
4
4
  // Errors
@@ -120,7 +120,7 @@ function Visit(value) {
120
120
  return NullType(value);
121
121
  if (IsNumber(value))
122
122
  return NumberType(value);
123
- if (IsPlainObject(value))
123
+ if (IsStandardObject(value))
124
124
  return ObjectType(value);
125
125
  if (IsString(value))
126
126
  return StringType(value);
@@ -1,16 +1,16 @@
1
1
  export { ValueError, ValueErrorType, ValueErrorIterator } from '../errors/index.mjs';
2
- export { Cast, ValueCastError } from './cast/index.mjs';
3
- export { Check } from './check/index.mjs';
4
- export { Clean } from './clean/index.mjs';
5
- export { Clone } from './clone/index.mjs';
6
- export { Convert } from './convert/index.mjs';
7
- export { Create, ValueCreateError } from './create/index.mjs';
8
- export { Default } from './default/index.mjs';
9
- export { Diff, Patch, Edit, Delete, Insert, Update, ValueDeltaError } from './delta/index.mjs';
10
- export { Equal } from './equal/index.mjs';
11
- export { Hash, ValueHashError } from './hash/index.mjs';
12
- export { Mutate, ValueMutateError, type Mutable } from './mutate/index.mjs';
13
- export { ValuePointer } from './pointer/index.mjs';
14
- export { TransformDecode, TransformEncode, HasTransform, TransformDecodeCheckError, TransformDecodeError, TransformEncodeCheckError, TransformEncodeError } from './transform/index.mjs';
15
- export { ArrayType, HasPropertyKey, IsArray, IsAsyncIterator, IsBigInt, IsBoolean, IsDate, IsFunction, IsInteger, IsIterator, IsNull, IsNumber, IsObject, IsPlainObject, IsPromise, IsString, IsSymbol, IsTypedArray, IsUint8Array, IsUndefined, IsValueType, type ObjectType, type TypedArrayType, type ValueType, } from './guard/index.mjs';
2
+ export * from './guard/index.mjs';
3
+ export * from './cast/index.mjs';
4
+ export * from './check/index.mjs';
5
+ export * from './clean/index.mjs';
6
+ export * from './clone/index.mjs';
7
+ export * from './convert/index.mjs';
8
+ export * from './create/index.mjs';
9
+ export * from './default/index.mjs';
10
+ export * from './delta/index.mjs';
11
+ export * from './equal/index.mjs';
12
+ export * from './hash/index.mjs';
13
+ export * from './mutate/index.mjs';
14
+ export * from './pointer/index.mjs';
15
+ export * from './transform/index.mjs';
16
16
  export { Value } from './value/index.mjs';
@@ -1,28 +1,28 @@
1
1
  // ------------------------------------------------------------------
2
- // Value Errors (re-export)
2
+ // Errors (re-export)
3
3
  // ------------------------------------------------------------------
4
4
  export { ValueErrorType, ValueErrorIterator } from '../errors/index.mjs';
5
5
  // ------------------------------------------------------------------
6
- // Value Operators
6
+ // Guards
7
7
  // ------------------------------------------------------------------
8
- export { Cast, ValueCastError } from './cast/index.mjs';
9
- export { Check } from './check/index.mjs';
10
- export { Clean } from './clean/index.mjs';
11
- export { Clone } from './clone/index.mjs';
12
- export { Convert } from './convert/index.mjs';
13
- export { Create, ValueCreateError } from './create/index.mjs';
14
- export { Default } from './default/index.mjs';
15
- export { Diff, Patch, Edit, Delete, Insert, Update, ValueDeltaError } from './delta/index.mjs';
16
- export { Equal } from './equal/index.mjs';
17
- export { Hash, ValueHashError } from './hash/index.mjs';
18
- export { Mutate, ValueMutateError } from './mutate/index.mjs';
19
- export { ValuePointer } from './pointer/index.mjs';
20
- export { TransformDecode, TransformEncode, HasTransform, TransformDecodeCheckError, TransformDecodeError, TransformEncodeCheckError, TransformEncodeError } from './transform/index.mjs';
8
+ export * from './guard/index.mjs';
21
9
  // ------------------------------------------------------------------
22
- // Value Guards
10
+ // Operators
23
11
  // ------------------------------------------------------------------
24
- export { HasPropertyKey, IsArray, IsAsyncIterator, IsBigInt, IsBoolean, IsDate, IsFunction, IsInteger, IsIterator, IsNull, IsNumber, IsObject, IsPlainObject, IsPromise, IsString, IsSymbol, IsTypedArray, IsUint8Array, IsUndefined, IsValueType, } from './guard/index.mjs';
12
+ export * from './cast/index.mjs';
13
+ export * from './check/index.mjs';
14
+ export * from './clean/index.mjs';
15
+ export * from './clone/index.mjs';
16
+ export * from './convert/index.mjs';
17
+ export * from './create/index.mjs';
18
+ export * from './default/index.mjs';
19
+ export * from './delta/index.mjs';
20
+ export * from './equal/index.mjs';
21
+ export * from './hash/index.mjs';
22
+ export * from './mutate/index.mjs';
23
+ export * from './pointer/index.mjs';
24
+ export * from './transform/index.mjs';
25
25
  // ------------------------------------------------------------------
26
- // Value Namespace
26
+ // Namespace
27
27
  // ------------------------------------------------------------------
28
28
  export { Value } from './value/index.mjs';
@@ -1,4 +1,4 @@
1
- import { IsPlainObject, IsArray, IsTypedArray, IsValueType } from '../guard/index.mjs';
1
+ import { IsStandardObject, IsArray, IsTypedArray, IsValueType } from '../guard/index.mjs';
2
2
  import { ValuePointer } from '../pointer/index.mjs';
3
3
  import { Clone } from '../clone/index.mjs';
4
4
  import { TypeBoxError } from '../../type/error/index.mjs';
@@ -11,7 +11,7 @@ export class ValueMutateError extends TypeBoxError {
11
11
  }
12
12
  }
13
13
  function ObjectType(root, path, current, next) {
14
- if (!IsPlainObject(current)) {
14
+ if (!IsStandardObject(current)) {
15
15
  ValuePointer.Set(root, path, Clone(next));
16
16
  }
17
17
  else {
@@ -63,7 +63,7 @@ function Visit(root, path, current, next) {
63
63
  return ArrayType(root, path, current, next);
64
64
  if (IsTypedArray(next))
65
65
  return TypedArrayType(root, path, current, next);
66
- if (IsPlainObject(next))
66
+ if (IsStandardObject(next))
67
67
  return ObjectType(root, path, current, next);
68
68
  if (IsValueType(next))
69
69
  return ValueType(root, path, current, next);
@@ -76,8 +76,8 @@ function IsNonMutableValue(value) {
76
76
  }
77
77
  function IsMismatchedValue(current, next) {
78
78
  // prettier-ignore
79
- return ((IsPlainObject(current) && IsArray(next)) ||
80
- (IsArray(current) && IsPlainObject(next)));
79
+ return ((IsStandardObject(current) && IsArray(next)) ||
80
+ (IsArray(current) && IsStandardObject(next)));
81
81
  }
82
82
  // ------------------------------------------------------------------
83
83
  // Mutate
@@ -7,7 +7,7 @@ import { Check } from '../check/index.mjs';
7
7
  // ------------------------------------------------------------------
8
8
  // ValueGuard
9
9
  // ------------------------------------------------------------------
10
- import { IsPlainObject, IsArray, IsValueType } from '../guard/index.mjs';
10
+ import { IsStandardObject, IsArray, IsValueType } from '../guard/index.mjs';
11
11
  // ------------------------------------------------------------------
12
12
  // TypeGuard
13
13
  // ------------------------------------------------------------------
@@ -56,7 +56,7 @@ function FromArray(schema, references, value) {
56
56
  }
57
57
  // prettier-ignore
58
58
  function FromIntersect(schema, references, value) {
59
- if (!IsPlainObject(value) || IsValueType(value))
59
+ if (!IsStandardObject(value) || IsValueType(value))
60
60
  return Default(schema, value);
61
61
  const knownKeys = KeyOfPropertyKeys(schema);
62
62
  const knownProperties = knownKeys.reduce((value, key) => {
@@ -81,7 +81,7 @@ function FromNot(schema, references, value) {
81
81
  }
82
82
  // prettier-ignore
83
83
  function FromObject(schema, references, value) {
84
- if (!IsPlainObject(value))
84
+ if (!IsStandardObject(value))
85
85
  return Default(schema, value);
86
86
  const knownKeys = KeyOfPropertyKeys(schema);
87
87
  const knownProperties = knownKeys.reduce((value, key) => {
@@ -103,7 +103,7 @@ function FromObject(schema, references, value) {
103
103
  }
104
104
  // prettier-ignore
105
105
  function FromRecord(schema, references, value) {
106
- if (!IsPlainObject(value))
106
+ if (!IsStandardObject(value))
107
107
  return Default(schema, value);
108
108
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
109
109
  const knownKeys = new RegExp(pattern);
@@ -7,7 +7,7 @@ import { Check } from '../check/index.mjs';
7
7
  // ------------------------------------------------------------------
8
8
  // ValueGuard
9
9
  // ------------------------------------------------------------------
10
- import { IsPlainObject, IsArray, IsValueType } from '../guard/index.mjs';
10
+ import { IsStandardObject, IsArray, IsValueType } from '../guard/index.mjs';
11
11
  // ------------------------------------------------------------------
12
12
  // TypeGuard
13
13
  // ------------------------------------------------------------------
@@ -57,7 +57,7 @@ function FromArray(schema, references, value) {
57
57
  // prettier-ignore
58
58
  function FromIntersect(schema, references, value) {
59
59
  const defaulted = Default(schema, value);
60
- if (!IsPlainObject(value) || IsValueType(value))
60
+ if (!IsStandardObject(value) || IsValueType(value))
61
61
  return defaulted;
62
62
  const knownKeys = KeyOfPropertyKeys(schema);
63
63
  const knownProperties = knownKeys.reduce((value, key) => {
@@ -83,7 +83,7 @@ function FromNot(schema, references, value) {
83
83
  // prettier-ignore
84
84
  function FromObject(schema, references, value) {
85
85
  const defaulted = Default(schema, value);
86
- if (!IsPlainObject(value))
86
+ if (!IsStandardObject(value))
87
87
  return defaulted;
88
88
  const knownKeys = KeyOfPropertyKeys(schema);
89
89
  const knownProperties = knownKeys.reduce((value, key) => {
@@ -105,7 +105,7 @@ function FromObject(schema, references, value) {
105
105
  // prettier-ignore
106
106
  function FromRecord(schema, references, value) {
107
107
  const defaulted = Default(schema, value);
108
- if (!IsPlainObject(value))
108
+ if (!IsStandardObject(value))
109
109
  return defaulted;
110
110
  const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
111
111
  const knownKeys = new RegExp(pattern);
@@ -1,2 +1,2 @@
1
1
  export { ValueError, ValueErrorType, ValueErrorIterator } from '../errors/index';
2
- export { TypeCompiler, TypeCheck, type TypeCompilerCodegenOptions, type TypeCompilerLanguageOption, TypeCompilerTypeGuardError, TypeCompilerUnknownTypeError } from './compiler';
2
+ export * from './compiler';
@@ -1,12 +1,22 @@
1
1
  "use strict";
2
2
 
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
3
17
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.TypeCompilerUnknownTypeError = exports.TypeCompilerTypeGuardError = exports.TypeCheck = exports.TypeCompiler = exports.ValueErrorIterator = exports.ValueErrorType = void 0;
18
+ exports.ValueErrorIterator = exports.ValueErrorType = void 0;
5
19
  var index_1 = require("../errors/index");
6
20
  Object.defineProperty(exports, "ValueErrorType", { enumerable: true, get: function () { return index_1.ValueErrorType; } });
7
21
  Object.defineProperty(exports, "ValueErrorIterator", { enumerable: true, get: function () { return index_1.ValueErrorIterator; } });
8
- var compiler_1 = require("./compiler");
9
- Object.defineProperty(exports, "TypeCompiler", { enumerable: true, get: function () { return compiler_1.TypeCompiler; } });
10
- Object.defineProperty(exports, "TypeCheck", { enumerable: true, get: function () { return compiler_1.TypeCheck; } });
11
- Object.defineProperty(exports, "TypeCompilerTypeGuardError", { enumerable: true, get: function () { return compiler_1.TypeCompilerTypeGuardError; } });
12
- Object.defineProperty(exports, "TypeCompilerUnknownTypeError", { enumerable: true, get: function () { return compiler_1.TypeCompilerUnknownTypeError; } });
22
+ __exportStar(require("./compiler"), exports);
@@ -1,2 +1,2 @@
1
- export { Errors, ValueError, ValueErrorIterator, ValueErrorType, ValueErrorsUnknownTypeError } from './errors';
2
- export { DefaultErrorFunction, GetErrorFunction, SetErrorFunction, type ErrorFunction, type ErrorFunctionParameter } from './function';
1
+ export * from './errors';
2
+ export * from './function';
@@ -1,13 +1,19 @@
1
1
  "use strict";
2
2
 
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
3
17
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.SetErrorFunction = exports.GetErrorFunction = exports.DefaultErrorFunction = exports.ValueErrorsUnknownTypeError = exports.ValueErrorType = exports.ValueErrorIterator = exports.Errors = void 0;
5
- var errors_1 = require("./errors");
6
- Object.defineProperty(exports, "Errors", { enumerable: true, get: function () { return errors_1.Errors; } });
7
- Object.defineProperty(exports, "ValueErrorIterator", { enumerable: true, get: function () { return errors_1.ValueErrorIterator; } });
8
- Object.defineProperty(exports, "ValueErrorType", { enumerable: true, get: function () { return errors_1.ValueErrorType; } });
9
- Object.defineProperty(exports, "ValueErrorsUnknownTypeError", { enumerable: true, get: function () { return errors_1.ValueErrorsUnknownTypeError; } });
10
- var function_1 = require("./function");
11
- Object.defineProperty(exports, "DefaultErrorFunction", { enumerable: true, get: function () { return function_1.DefaultErrorFunction; } });
12
- Object.defineProperty(exports, "GetErrorFunction", { enumerable: true, get: function () { return function_1.GetErrorFunction; } });
13
- Object.defineProperty(exports, "SetErrorFunction", { enumerable: true, get: function () { return function_1.SetErrorFunction; } });
18
+ __exportStar(require("./errors"), exports);
19
+ __exportStar(require("./function"), exports);
@@ -1,69 +1,69 @@
1
- export { Kind, Hint, ReadonlyKind, OptionalKind, TransformKind } from './type/symbols/index';
2
- export { PatternBoolean, PatternBooleanExact, PatternNumber, PatternNumberExact, PatternString, PatternStringExact } from './type/patterns/index';
3
- export { TypeRegistry, FormatRegistry } from './type/registry/index';
4
- export { TypeGuard, ValueGuard } from './type/guard/index';
5
- export { CloneType, CloneRest } from './type/clone/type';
6
- export { TypeBoxError } from './type/error/index';
7
- export { SetComplement, SetDistinct, SetIncludes, SetIntersect, SetIntersectMany, SetIsSubset, SetUnion, SetUnionMany, type TSetComplement, type TSetDistinct, type TSetIncludes, type TSetIntersect, type TSetIntersectMany, type TSetIsSubset, type TSetUnion, type TSetUnionMany, } from './type/sets/index';
8
- export { Increment, type TIncrement, type Assert, type AssertType, type AssertRest, type AssertProperties, type Ensure, type Evaluate, type TupleToIntersect, type TupleToUnion, type UnionToTuple } from './type/helpers/index';
9
- export { Any, type TAny } from './type/any/index';
10
- export { Array, type TArray, type ArrayOptions } from './type/array/index';
11
- export { AsyncIterator, type TAsyncIterator } from './type/async-iterator/index';
12
- export { Awaited, type TAwaited } from './type/awaited/index';
13
- export { BigInt, type TBigInt, type BigIntOptions } from './type/bigint/index';
14
- export { Boolean, type TBoolean } from './type/boolean/index';
15
- export { Composite, type TComposite } from './type/composite/index';
16
- export { Const, type TConst } from './type/const/index';
17
- export { Constructor, type TConstructor } from './type/constructor/index';
18
- export { ConstructorParameters, type TConstructorParameters } from './type/constructor-parameters/index';
19
- export { Date, type TDate, type DateOptions } from './type/date/index';
20
- export { Deref, type TDeref } from './type/deref/index';
21
- export { Enum, type TEnum } from './type/enum/index';
22
- export { Exclude, type TExclude, type TExcludeFromMappedResult, type TExcludeFromTemplateLiteral } from './type/exclude/index';
23
- export { Extends, ExtendsCheck, ExtendsResult, ExtendsUndefinedCheck, type TExtends, type ExtendsFromMappedResult, type ExtendsFromMappedKey } from './type/extends/index';
24
- export { Extract, type TExtract, type TExtractFromMappedResult, type TExtractFromTemplateLiteral } from './type/extract/index';
25
- export { Function, type TFunction } from './type/function/index';
26
- export { Index, IndexPropertyKeys, IndexFromPropertyKeys, IndexFromPropertyKey, IndexFromMappedKey, IndexFromMappedResult, type TIndex, type TIndexPropertyKeys, type TIndexFromPropertyKeys, type TIndexFromPropertyKey, type TIndexFromMappedKey, type TIndexFromMappedResult, } from './type/indexed/index';
27
- export { InstanceType, type TInstanceType } from './type/instance-type/index';
28
- export { Integer, type TInteger, type IntegerOptions } from './type/integer/index';
29
- export { Intersect, IntersectEvaluated, type TIntersect, type TIntersectEvaluated, type IntersectOptions } from './type/intersect/index';
30
- export { Iterator, type TIterator } from './type/iterator/index';
31
- export { Intrinsic, IntrinsicFromMappedKey, type TIntrinsic, Capitalize, type TCapitalize, Lowercase, type TLowercase, Uncapitalize, type TUncapitalize, Uppercase, type TUppercase } from './type/intrinsic/index';
32
- export { KeyOf, KeyOfPropertyKeys, KeyOfPropertyKeysToRest, KeyOfFromMappedResult, KeyOfPattern, type TKeyOf, type TKeyOfPropertyKeys, type TKeyOfPropertyKeysToRest, type TKeyOfFromMappedResult } from './type/keyof/index';
33
- export { Literal, type TLiteral, type TLiteralValue } from './type/literal/index';
34
- export { Mapped, MappedKey, MappedResult, MappedFunctionReturnType, type TMapped, type TMappedKey, type TMappedResult, type TMappedFunction, type TMappedFunctionReturnType } from './type/mapped/index';
35
- export { Never, type TNever } from './type/never/index';
36
- export { Not, type TNot } from './type/not/index';
37
- export { Null, type TNull } from './type/null/index';
38
- export { Number, type TNumber, type NumberOptions } from './type/number/index';
39
- export { Object, type TObject, type TProperties, type ObjectOptions } from './type/object/index';
40
- export { Omit, type TOmit, type TOmitFromMappedKey, type TOmitFromMappedResult } from './type/omit/index';
41
- export { Optional, OptionalFromMappedResult, type TOptional, type TOptionalWithFlag, type TOptionalFromMappedResult } from './type/optional/index';
42
- export { Parameters, type TParameters } from './type/parameters/index';
43
- export { Partial, PartialFromMappedResult, type TPartial, type TPartialFromMappedResult } from './type/partial/index';
44
- export { Pick, type TPick, type TPickFromMappedKey, type TPickFromMappedResult } from './type/pick/index';
45
- export { Promise, type TPromise } from './type/promise/index';
46
- export { Readonly, ReadonlyFromMappedResult, type TReadonly, type TReadonlyWithFlag, type TReadonlyFromMappedResult } from './type/readonly/index';
47
- export { ReadonlyOptional, type TReadonlyOptional } from './type/readonly-optional/index';
48
- export { Record, type TRecord, type TRecordOrObject } from './type/record/index';
49
- export { Recursive, type TRecursive, type TThis } from './type/recursive/index';
50
- export { Ref, type TRef } from './type/ref/index';
51
- export { RegExp, type TRegExp, type RegExpOptions } from './type/regexp/index';
52
- export { Required, type TRequired, type TRequiredFromMappedResult } from './type/required/index';
53
- export { Rest, type TRest } from './type/rest/index';
54
- export { ReturnType, type TReturnType } from './type/return-type/index';
55
- export { type TSchema, type TKind, type SchemaOptions, type TAnySchema } from './type/schema/index';
56
- export { type Static, type StaticDecode, type StaticEncode, type TDecodeType, type TDecodeRest, type TDecodeProperties } from './type/static/index';
57
- export { Strict } from './type/strict/index';
58
- export { String, type TString, type StringOptions, type StringFormatOption, type StringContentEncodingOption } from './type/string/index';
59
- export { Symbol, type TSymbol, type TSymbolValue } from './type/symbol/index';
60
- export { TemplateLiteral, TemplateLiteralSyntax, TemplateLiteralGenerate, TemplateLiteralParse, TemplateLiteralParseExact, TemplateLiteralToUnion, IsTemplateLiteralFinite, TemplateLiteralExpressionGenerate, IsTemplateLiteralExpressionFinite, type TTemplateLiteral, type TTemplateLiteralSyntax, type TTemplateLiteralGenerate, type TTemplateLiteralKind, type TTemplateLiteralToUnion, type TIsTemplateLiteralFinite, } from './type/template-literal/index';
61
- export { Transform, TransformDecodeBuilder, TransformEncodeBuilder, type TTransform, type TransformOptions, type TransformFunction } from './type/transform/index';
62
- export { Tuple, type TTuple } from './type/tuple/index';
63
- export { Uint8Array, type TUint8Array, type Uint8ArrayOptions } from './type/uint8array/index';
64
- export { Undefined, type TUndefined } from './type/undefined/index';
65
- export { Union, UnionEvaluated, type TUnion, type TUnionEvaluated } from './type/union/index';
66
- export { Unknown, type TUnknown } from './type/unknown/index';
67
- export { Unsafe, type TUnsafe } from './type/unsafe/index';
68
- export { Void, type TVoid } from './type/void/index';
69
- export { Type, JsonTypeBuilder, JavaScriptTypeBuilder } from './type/type/index';
1
+ export * from './type/clone/index';
2
+ export * from './type/error/index';
3
+ export * from './type/guard/index';
4
+ export * from './type/helpers/index';
5
+ export * from './type/patterns/index';
6
+ export * from './type/registry/index';
7
+ export * from './type/sets/index';
8
+ export * from './type/symbols/index';
9
+ export * from './type/any/index';
10
+ export * from './type/array/index';
11
+ export * from './type/async-iterator/index';
12
+ export * from './type/awaited/index';
13
+ export * from './type/bigint/index';
14
+ export * from './type/boolean/index';
15
+ export * from './type/composite/index';
16
+ export * from './type/const/index';
17
+ export * from './type/constructor/index';
18
+ export * from './type/constructor-parameters/index';
19
+ export * from './type/date/index';
20
+ export * from './type/deref/index';
21
+ export * from './type/enum/index';
22
+ export * from './type/exclude/index';
23
+ export * from './type/extends/index';
24
+ export * from './type/extract/index';
25
+ export * from './type/function/index';
26
+ export * from './type/indexed/index';
27
+ export * from './type/instance-type/index';
28
+ export * from './type/integer/index';
29
+ export * from './type/intersect/index';
30
+ export * from './type/iterator/index';
31
+ export * from './type/intrinsic/index';
32
+ export * from './type/keyof/index';
33
+ export * from './type/literal/index';
34
+ export * from './type/mapped/index';
35
+ export * from './type/never/index';
36
+ export * from './type/not/index';
37
+ export * from './type/null/index';
38
+ export * from './type/number/index';
39
+ export * from './type/object/index';
40
+ export * from './type/omit/index';
41
+ export * from './type/optional/index';
42
+ export * from './type/parameters/index';
43
+ export * from './type/partial/index';
44
+ export * from './type/pick/index';
45
+ export * from './type/promise/index';
46
+ export * from './type/readonly/index';
47
+ export * from './type/readonly-optional/index';
48
+ export * from './type/record/index';
49
+ export * from './type/recursive/index';
50
+ export * from './type/ref/index';
51
+ export * from './type/regexp/index';
52
+ export * from './type/required/index';
53
+ export * from './type/rest/index';
54
+ export * from './type/return-type/index';
55
+ export * from './type/schema/index';
56
+ export * from './type/static/index';
57
+ export * from './type/strict/index';
58
+ export * from './type/string/index';
59
+ export * from './type/symbol/index';
60
+ export * from './type/template-literal/index';
61
+ export * from './type/transform/index';
62
+ export * from './type/tuple/index';
63
+ export * from './type/uint8array/index';
64
+ export * from './type/undefined/index';
65
+ export * from './type/union/index';
66
+ export * from './type/unknown/index';
67
+ export * from './type/unsafe/index';
68
+ export * from './type/void/index';
69
+ export * from './type/type/index';