@sinclair/typebox 0.29.6 → 0.30.0-dev-2

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.
@@ -3,62 +3,67 @@ export declare enum ValueErrorType {
3
3
  Array = 0,
4
4
  ArrayMinItems = 1,
5
5
  ArrayMaxItems = 2,
6
- ArrayUniqueItems = 3,
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
- NumberMinimum = 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
6
+ ArrayContains = 3,
7
+ ArrayMinContains = 4,
8
+ ArrayMaxContains = 5,
9
+ ArrayUniqueItems = 6,
10
+ AsyncIterator = 7,
11
+ BigInt = 8,
12
+ BigIntMultipleOf = 9,
13
+ BigIntExclusiveMinimum = 10,
14
+ BigIntExclusiveMaximum = 11,
15
+ BigIntMinimum = 12,
16
+ BigIntMaximum = 13,
17
+ Boolean = 14,
18
+ Date = 15,
19
+ DateExclusiveMinimumTimestamp = 16,
20
+ DateExclusiveMaximumTimestamp = 17,
21
+ DateMinimumTimestamp = 18,
22
+ DateMaximumTimestamp = 19,
23
+ Function = 20,
24
+ Integer = 21,
25
+ IntegerMultipleOf = 22,
26
+ IntegerExclusiveMinimum = 23,
27
+ IntegerExclusiveMaximum = 24,
28
+ IntegerMinimum = 25,
29
+ IntegerMaximum = 26,
30
+ Intersect = 27,
31
+ IntersectUnevaluatedProperties = 28,
32
+ Iterator = 29,
33
+ Literal = 30,
34
+ Never = 31,
35
+ Not = 32,
36
+ Null = 33,
37
+ Number = 34,
38
+ NumberMultipleOf = 35,
39
+ NumberExclusiveMinimum = 36,
40
+ NumberExclusiveMaximum = 37,
41
+ NumberMinimum = 38,
42
+ NumberMaximum = 39,
43
+ Object = 40,
44
+ ObjectMinProperties = 41,
45
+ ObjectMaxProperties = 42,
46
+ ObjectAdditionalProperties = 43,
47
+ ObjectRequiredProperties = 44,
48
+ Promise = 45,
49
+ RecordKeyNumeric = 46,
50
+ RecordKeyString = 47,
51
+ String = 48,
52
+ StringMinLength = 49,
53
+ StringMaxLength = 50,
54
+ StringPattern = 51,
55
+ StringFormatUnknown = 52,
56
+ StringFormat = 53,
57
+ Symbol = 54,
58
+ TupleZeroLength = 55,
59
+ TupleLength = 56,
60
+ Undefined = 57,
61
+ Union = 58,
62
+ Uint8Array = 59,
63
+ Uint8ArrayMinByteLength = 60,
64
+ Uint8ArrayMaxByteLength = 61,
65
+ Void = 62,
66
+ Kind = 63
62
67
  }
63
68
  export interface ValueError {
64
69
  type: ValueErrorType;
@@ -82,7 +87,7 @@ export declare class ValueErrorsDereferenceError extends Error {
82
87
  readonly schema: Types.TRef | Types.TThis;
83
88
  constructor(schema: Types.TRef | Types.TThis);
84
89
  }
85
- /** Provides functionality to generate a sequence of errors against a TypeBox type. */
86
- export declare namespace ValueErrors {
87
- function Errors<T extends Types.TSchema>(schema: T, references: Types.TSchema[], value: any): ValueErrorIterator;
88
- }
90
+ /** Returns an iterator for each error in this value. */
91
+ export declare function Errors<T extends Types.TSchema>(schema: T, references: Types.TSchema[], value: unknown): ValueErrorIterator;
92
+ /** Returns an iterator for each error in this value. */
93
+ export declare function Errors<T extends Types.TSchema>(schema: T, value: unknown): ValueErrorIterator;