@sinclair/typebox 0.30.4 → 0.31.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.
@@ -1,69 +1,68 @@
1
1
  import * as Types from '../typebox';
2
2
  export declare enum ValueErrorType {
3
- Array = 0,
4
- ArrayMinItems = 1,
3
+ ArrayContains = 0,
4
+ ArrayMaxContains = 1,
5
5
  ArrayMaxItems = 2,
6
- ArrayContains = 3,
7
- ArrayMinContains = 4,
8
- ArrayMaxContains = 5,
9
- ArrayUniqueItems = 6,
6
+ ArrayMinContains = 3,
7
+ ArrayMinItems = 4,
8
+ ArrayUniqueItems = 5,
9
+ Array = 6,
10
10
  AsyncIterator = 7,
11
- BigInt = 8,
12
- BigIntMultipleOf = 9,
13
- BigIntExclusiveMinimum = 10,
14
- BigIntExclusiveMaximum = 11,
15
- BigIntMinimum = 12,
16
- BigIntMaximum = 13,
11
+ BigIntExclusiveMaximum = 8,
12
+ BigIntExclusiveMinimum = 9,
13
+ BigIntMaximum = 10,
14
+ BigIntMinimum = 11,
15
+ BigIntMultipleOf = 12,
16
+ BigInt = 13,
17
17
  Boolean = 14,
18
- Date = 15,
18
+ DateExclusiveMaximumTimestamp = 15,
19
19
  DateExclusiveMinimumTimestamp = 16,
20
- DateExclusiveMaximumTimestamp = 17,
20
+ DateMaximumTimestamp = 17,
21
21
  DateMinimumTimestamp = 18,
22
- DateMaximumTimestamp = 19,
23
- Function = 20,
24
- Integer = 21,
25
- IntegerMultipleOf = 22,
22
+ DateMultipleOfTimestamp = 19,
23
+ Date = 20,
24
+ Function = 21,
25
+ IntegerExclusiveMaximum = 22,
26
26
  IntegerExclusiveMinimum = 23,
27
- IntegerExclusiveMaximum = 24,
27
+ IntegerMaximum = 24,
28
28
  IntegerMinimum = 25,
29
- IntegerMaximum = 26,
30
- Intersect = 27,
29
+ IntegerMultipleOf = 26,
30
+ Integer = 27,
31
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,
32
+ Intersect = 29,
33
+ Iterator = 30,
34
+ Kind = 31,
35
+ Literal = 32,
36
+ Never = 33,
37
+ Not = 34,
38
+ Null = 35,
39
+ NumberExclusiveMaximum = 36,
40
+ NumberExclusiveMinimum = 37,
41
+ NumberMaximum = 38,
42
+ NumberMinimum = 39,
43
+ NumberMultipleOf = 40,
44
+ Number = 41,
45
+ ObjectAdditionalProperties = 42,
46
+ ObjectMaxProperties = 43,
47
+ ObjectMinProperties = 44,
48
+ ObjectRequiredProperty = 45,
49
+ Object = 46,
50
+ Promise = 47,
51
+ StringFormatUnknown = 48,
52
+ StringFormat = 49,
53
53
  StringMaxLength = 50,
54
- StringPattern = 51,
55
- StringFormatUnknown = 52,
56
- StringFormat = 53,
54
+ StringMinLength = 51,
55
+ StringPattern = 52,
56
+ String = 53,
57
57
  Symbol = 54,
58
- TupleZeroLength = 55,
59
- TupleLength = 56,
60
- Undefined = 57,
61
- Union = 58,
58
+ TupleLength = 55,
59
+ Tuple = 56,
60
+ Uint8ArrayMaxByteLength = 57,
61
+ Uint8ArrayMinByteLength = 58,
62
62
  Uint8Array = 59,
63
- Uint8ArrayMinByteLength = 60,
64
- Uint8ArrayMaxByteLength = 61,
65
- Void = 62,
66
- Kind = 63
63
+ Undefined = 60,
64
+ Union = 61,
65
+ Void = 62
67
66
  }
68
67
  export interface ValueError {
69
68
  type: ValueErrorType;
@@ -72,6 +71,10 @@ export interface ValueError {
72
71
  value: unknown;
73
72
  message: string;
74
73
  }
74
+ export declare class ValueErrorsUnknownTypeError extends Types.TypeBoxError {
75
+ readonly schema: Types.TSchema;
76
+ constructor(schema: Types.TSchema);
77
+ }
75
78
  export declare class ValueErrorIterator {
76
79
  private readonly iterator;
77
80
  constructor(iterator: IterableIterator<ValueError>);
@@ -79,14 +82,6 @@ export declare class ValueErrorIterator {
79
82
  /** Returns the first value error or undefined if no errors */
80
83
  First(): ValueError | undefined;
81
84
  }
82
- export declare class ValueErrorsUnknownTypeError extends Error {
83
- readonly schema: Types.TSchema;
84
- constructor(schema: Types.TSchema);
85
- }
86
- export declare class ValueErrorsDereferenceError extends Error {
87
- readonly schema: Types.TRef | Types.TThis;
88
- constructor(schema: Types.TRef | Types.TThis);
89
- }
90
85
  /** Returns an iterator for each error in this value. */
91
86
  export declare function Errors<T extends Types.TSchema>(schema: T, references: Types.TSchema[], value: unknown): ValueErrorIterator;
92
87
  /** Returns an iterator for each error in this value. */