@sinclair/typebox 0.25.24 → 0.26.0-dev.1

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 (46) hide show
  1. package/compiler/compiler.d.ts +10 -5
  2. package/compiler/compiler.js +161 -123
  3. package/errors/errors.d.ts +56 -46
  4. package/errors/errors.js +234 -153
  5. package/package.json +1 -6
  6. package/readme.md +294 -207
  7. package/system/system.d.ts +9 -6
  8. package/system/system.js +17 -17
  9. package/typebox.d.ts +388 -162
  10. package/typebox.js +1716 -229
  11. package/value/cast.d.ts +2 -2
  12. package/value/cast.js +121 -188
  13. package/value/check.d.ts +1 -1
  14. package/value/check.js +156 -111
  15. package/value/convert.d.ts +13 -0
  16. package/value/convert.js +345 -0
  17. package/value/create.d.ts +6 -2
  18. package/value/create.js +149 -97
  19. package/{hash → value}/hash.js +39 -14
  20. package/value/index.d.ts +1 -0
  21. package/value/index.js +3 -1
  22. package/value/value.d.ts +2 -8
  23. package/value/value.js +20 -14
  24. package/conditional/conditional.d.ts +0 -17
  25. package/conditional/conditional.js +0 -91
  26. package/conditional/index.d.ts +0 -2
  27. package/conditional/index.js +0 -45
  28. package/conditional/structural.d.ts +0 -11
  29. package/conditional/structural.js +0 -685
  30. package/custom/custom.d.ts +0 -12
  31. package/custom/custom.js +0 -55
  32. package/custom/index.d.ts +0 -1
  33. package/custom/index.js +0 -44
  34. package/format/format.d.ts +0 -12
  35. package/format/format.js +0 -55
  36. package/format/index.d.ts +0 -1
  37. package/format/index.js +0 -44
  38. package/guard/extends.d.ts +0 -10
  39. package/guard/extends.js +0 -50
  40. package/guard/guard.d.ts +0 -60
  41. package/guard/guard.js +0 -440
  42. package/guard/index.d.ts +0 -2
  43. package/guard/index.js +0 -45
  44. package/hash/index.d.ts +0 -1
  45. package/hash/index.js +0 -44
  46. /package/{hash → value}/hash.d.ts +0 -0
@@ -4,51 +4,61 @@ export declare enum ValueErrorType {
4
4
  ArrayMinItems = 1,
5
5
  ArrayMaxItems = 2,
6
6
  ArrayUniqueItems = 3,
7
- Boolean = 4,
8
- Date = 5,
9
- DateExclusiveMinimumTimestamp = 6,
10
- DateExclusiveMaximumTimestamp = 7,
11
- DateMinimumTimestamp = 8,
12
- DateMaximumTimestamp = 9,
13
- Function = 10,
14
- Integer = 11,
15
- IntegerMultipleOf = 12,
16
- IntegerExclusiveMinimum = 13,
17
- IntegerExclusiveMaximum = 14,
18
- IntegerMinimum = 15,
19
- IntegerMaximum = 16,
20
- Literal = 17,
21
- Never = 18,
22
- Null = 19,
23
- Number = 20,
24
- NumberMultipleOf = 21,
25
- NumberExclusiveMinimum = 22,
26
- NumberExclusiveMaximum = 23,
27
- NumberMinumum = 24,
28
- NumberMaximum = 25,
29
- Object = 26,
30
- ObjectMinProperties = 27,
31
- ObjectMaxProperties = 28,
32
- ObjectAdditionalProperties = 29,
33
- ObjectRequiredProperties = 30,
34
- Promise = 31,
35
- RecordKeyNumeric = 32,
36
- RecordKeyString = 33,
37
- String = 34,
38
- StringMinLength = 35,
39
- StringMaxLength = 36,
40
- StringPattern = 37,
41
- StringFormatUnknown = 38,
42
- StringFormat = 39,
43
- TupleZeroLength = 40,
44
- TupleLength = 41,
45
- Undefined = 42,
46
- Union = 43,
47
- Uint8Array = 44,
48
- Uint8ArrayMinByteLength = 45,
49
- Uint8ArrayMaxByteLength = 46,
50
- Void = 47,
51
- Custom = 48
7
+ BigInt = 4,
8
+ BigIntMultipleOf = 5,
9
+ BigIntExclusiveMinimum = 6,
10
+ BigIntExclusiveMaximum = 7,
11
+ BigIntMinimum = 8,
12
+ BigIntMaximum = 9,
13
+ Boolean = 10,
14
+ Date = 11,
15
+ DateExclusiveMinimumTimestamp = 12,
16
+ DateExclusiveMaximumTimestamp = 13,
17
+ DateMinimumTimestamp = 14,
18
+ DateMaximumTimestamp = 15,
19
+ Function = 16,
20
+ Integer = 17,
21
+ IntegerMultipleOf = 18,
22
+ IntegerExclusiveMinimum = 19,
23
+ IntegerExclusiveMaximum = 20,
24
+ IntegerMinimum = 21,
25
+ IntegerMaximum = 22,
26
+ Intersect = 23,
27
+ IntersectUnevaluatedProperties = 24,
28
+ Literal = 25,
29
+ Never = 26,
30
+ Not = 27,
31
+ Null = 28,
32
+ Number = 29,
33
+ NumberMultipleOf = 30,
34
+ NumberExclusiveMinimum = 31,
35
+ NumberExclusiveMaximum = 32,
36
+ NumberMinumum = 33,
37
+ NumberMaximum = 34,
38
+ Object = 35,
39
+ ObjectMinProperties = 36,
40
+ ObjectMaxProperties = 37,
41
+ ObjectAdditionalProperties = 38,
42
+ ObjectRequiredProperties = 39,
43
+ Promise = 40,
44
+ RecordKeyNumeric = 41,
45
+ RecordKeyString = 42,
46
+ String = 43,
47
+ StringMinLength = 44,
48
+ StringMaxLength = 45,
49
+ StringPattern = 46,
50
+ StringFormatUnknown = 47,
51
+ StringFormat = 48,
52
+ Symbol = 49,
53
+ TupleZeroLength = 50,
54
+ TupleLength = 51,
55
+ Undefined = 52,
56
+ Union = 53,
57
+ Uint8Array = 54,
58
+ Uint8ArrayMinByteLength = 55,
59
+ Uint8ArrayMaxByteLength = 56,
60
+ Void = 57,
61
+ Custom = 58
52
62
  }
53
63
  export interface ValueError {
54
64
  type: ValueErrorType;
@@ -63,5 +73,5 @@ export declare class ValueErrorsUnknownTypeError extends Error {
63
73
  }
64
74
  /** Provides functionality to generate a sequence of errors against a TypeBox type. */
65
75
  export declare namespace ValueErrors {
66
- function Errors<T extends Types.TSchema>(schema: T, references: Types.TSchema[], value: any): IterableIterator<ValueError>;
76
+ function Errors<T extends Types.TSchema>(schema: T, value: any): IterableIterator<ValueError>;
67
77
  }