@strictly/define 0.0.6 → 0.0.8

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 (45) hide show
  1. package/.out/tsconfig.tsbuildinfo +1 -1
  2. package/.out/types/builders.d.ts +2 -1
  3. package/.out/types/builders.js +3 -1
  4. package/.out/types/specs/flattened_accessors_of_type.tests.js +1 -2
  5. package/.out/types/specs/flattened_types_of_type.tests.js +8 -16
  6. package/.out/types/specs/flattened_validators_of_validating_type.tests.js +2 -4
  7. package/.out/types/specs/flattened_values_of_type.tests.js +2 -4
  8. package/.out/types/specs/partial_type_of_type.tests.js +6 -12
  9. package/.out/types/specs/paths_of_type.tests.js +23 -39
  10. package/.out/types/specs/readonly_type_of_type.tests.js +7 -14
  11. package/.out/types/specs/strict_definitions.tests.js +2 -4
  12. package/.out/types/specs/type_of_type.tests.js +3 -6
  13. package/.out/types/specs/value_of_type.tests.js +13 -26
  14. package/.out/types/specs/value_to_type_paths_of_type.tests.js +8 -16
  15. package/.out/validation/specs/errors_of_validators.tests.js +1 -2
  16. package/.out/validation/specs/validators_of_values.tests.js +3 -6
  17. package/.out/validation/validator.d.ts +2 -2
  18. package/.out/validation/validator.js +0 -1
  19. package/.out/validation/validators/defined_validator.d.ts +1 -1
  20. package/.out/validation/validators/minimum_string_length_validator.d.ts +1 -1
  21. package/.turbo/turbo-build.log +8 -8
  22. package/.turbo/turbo-check-types.log +1 -1
  23. package/.turbo/turbo-release$colon$exports.log +1 -1
  24. package/dist/index.cjs +27 -26
  25. package/dist/index.d.cts +5 -5
  26. package/dist/index.d.ts +5 -5
  27. package/dist/index.js +27 -26
  28. package/package.json +1 -1
  29. package/types/builders.ts +8 -2
  30. package/types/specs/flattened_accessors_of_type.tests.ts +2 -2
  31. package/types/specs/flattened_types_of_type.tests.ts +16 -16
  32. package/types/specs/flattened_validators_of_validating_type.tests.ts +4 -4
  33. package/types/specs/flattened_values_of_type.tests.ts +4 -4
  34. package/types/specs/partial_type_of_type.tests.ts +12 -12
  35. package/types/specs/paths_of_type.tests.ts +39 -39
  36. package/types/specs/readonly_type_of_type.tests.ts +14 -14
  37. package/types/specs/strict_definitions.tests.ts +6 -6
  38. package/types/specs/type_of_type.tests.ts +6 -6
  39. package/types/specs/value_of_type.tests.ts +26 -26
  40. package/types/specs/value_to_type_paths_of_type.tests.ts +16 -16
  41. package/validation/specs/errors_of_validators.tests.ts +2 -2
  42. package/validation/specs/validators_of_values.tests.ts +6 -6
  43. package/validation/validator.ts +13 -4
  44. package/validation/validators/defined_validator.ts +1 -3
  45. package/validation/validators/minimum_string_length_validator.ts +2 -2
@@ -12,12 +12,12 @@ describe('FlattenedValuesOfType', function () {
12
12
  const builder = record<typeof numberType, string>(numberType)
13
13
  type V = FlattenedValuesOfType<typeof builder.narrow>
14
14
 
15
- let v: {
15
+ type C = {
16
16
  readonly $: Record<string, number>,
17
17
  readonly [_: `$.${string}`]: number,
18
18
  }
19
19
  it('equals expected type', function () {
20
- expectTypeOf(v).toEqualTypeOf<V>()
20
+ expectTypeOf<C>().toEqualTypeOf<V>()
21
21
  })
22
22
  })
23
23
 
@@ -25,7 +25,7 @@ describe('FlattenedValuesOfType', function () {
25
25
  const builder = object().optionalField('a', stringType)
26
26
  type V = FlattenedValuesOfType<typeof builder>
27
27
 
28
- let v: {
28
+ type C = {
29
29
  readonly $: {
30
30
  a?: string | undefined,
31
31
  },
@@ -33,7 +33,7 @@ describe('FlattenedValuesOfType', function () {
33
33
  }
34
34
 
35
35
  it('equals expected type', function () {
36
- expectTypeOf(v).toEqualTypeOf<V>()
36
+ expectTypeOf<C>().toEqualTypeOf<V>()
37
37
  })
38
38
  })
39
39
  })
@@ -14,7 +14,7 @@ describe('PartialTypeDefOf', function () {
14
14
  describe('literal', function () {
15
15
  type T = PartialTypeOfType<typeof numberType._type>
16
16
 
17
- let t: {
17
+ type C = {
18
18
  readonly typeDef: {
19
19
  readonly type: TypeDefType.Union,
20
20
  readonly discriminator: null,
@@ -32,7 +32,7 @@ describe('PartialTypeDefOf', function () {
32
32
  }
33
33
 
34
34
  it('equals expected type', function () {
35
- expectTypeOf(t).toEqualTypeOf<T>()
35
+ expectTypeOf<C>().toEqualTypeOf<T>()
36
36
  })
37
37
  })
38
38
 
@@ -40,7 +40,7 @@ describe('PartialTypeDefOf', function () {
40
40
  const builder = list(numberType)
41
41
  type T = PartialTypeOfType<typeof builder._type>
42
42
 
43
- let t: {
43
+ type C = {
44
44
  readonly typeDef: {
45
45
  readonly type: TypeDefType.Union,
46
46
  readonly discriminator: null,
@@ -70,7 +70,7 @@ describe('PartialTypeDefOf', function () {
70
70
  },
71
71
  }
72
72
  it('equals expected type', function () {
73
- expectTypeOf(t).toEqualTypeOf<T>()
73
+ expectTypeOf<C>().toEqualTypeOf<T>()
74
74
  })
75
75
  })
76
76
 
@@ -78,7 +78,7 @@ describe('PartialTypeDefOf', function () {
78
78
  const builder = record<typeof numberType, 'a' | 'b'>(numberType)
79
79
  type T = SimplifyDeep<PartialTypeOfType<typeof builder._type>>
80
80
 
81
- let t: {
81
+ type C = {
82
82
  readonly typeDef: {
83
83
  readonly type: TypeDefType.Union,
84
84
  readonly discriminator: null,
@@ -110,7 +110,7 @@ describe('PartialTypeDefOf', function () {
110
110
  }
111
111
 
112
112
  it('equals expected type', function () {
113
- expectTypeOf(t).toEqualTypeOf<T>()
113
+ expectTypeOf<C>().toEqualTypeOf<T>()
114
114
  })
115
115
  })
116
116
 
@@ -120,7 +120,7 @@ describe('PartialTypeDefOf', function () {
120
120
  .readonlyField('b', stringType)
121
121
  type T = PartialTypeOfType<typeof builder._type>
122
122
 
123
- let t: {
123
+ type C = {
124
124
  readonly typeDef: {
125
125
  readonly type: TypeDefType.Union,
126
126
  readonly discriminator: null,
@@ -167,7 +167,7 @@ describe('PartialTypeDefOf', function () {
167
167
  }
168
168
 
169
169
  it('equals expected type', function () {
170
- expectTypeOf(t).toEqualTypeOf<T>()
170
+ expectTypeOf<C>().toEqualTypeOf<T>()
171
171
  })
172
172
  })
173
173
 
@@ -178,7 +178,7 @@ describe('PartialTypeDefOf', function () {
178
178
  .or('2', stringType)
179
179
  type T = PartialTypeOfType<typeof builder._type>
180
180
 
181
- let t: {
181
+ type C = {
182
182
  readonly typeDef: {
183
183
  readonly type: TypeDefType.Union,
184
184
  readonly discriminator: null,
@@ -206,7 +206,7 @@ describe('PartialTypeDefOf', function () {
206
206
  }
207
207
 
208
208
  it('equals expected type', function () {
209
- expectTypeOf(t).toEqualTypeOf<T>()
209
+ expectTypeOf<C>().toEqualTypeOf<T>()
210
210
  })
211
211
  })
212
212
  })
@@ -215,7 +215,7 @@ describe('PartialTypeDefOf', function () {
215
215
  const builder = list(numberType).readonly()
216
216
  type T = PartialTypeOfType<typeof builder._type>
217
217
 
218
- let t: {
218
+ type C = {
219
219
  readonly typeDef: {
220
220
  readonly type: TypeDefType.Union,
221
221
  readonly discriminator: null,
@@ -245,7 +245,7 @@ describe('PartialTypeDefOf', function () {
245
245
  },
246
246
  }
247
247
  it('equals expected type', function () {
248
- expectTypeOf(t).toEqualTypeOf<T>()
248
+ expectTypeOf<C>().toEqualTypeOf<T>()
249
249
  })
250
250
  })
251
251
  })
@@ -12,13 +12,13 @@ import { type PathsOfType } from 'types/paths_of_type'
12
12
 
13
13
  describe('PathsOfType', function () {
14
14
  describe('literal', function () {
15
- let path: '$'
15
+ type P = '$'
16
16
 
17
17
  describe('regular', function () {
18
18
  type T = PathsOfType<typeof stringType>
19
19
 
20
20
  it('equals expected type', function () {
21
- expectTypeOf(path).toEqualTypeOf<T>()
21
+ expectTypeOf<P>().toEqualTypeOf<T>()
22
22
  })
23
23
  })
24
24
 
@@ -27,20 +27,20 @@ describe('PathsOfType', function () {
27
27
  type T = PathsOfType<typeof builder>
28
28
 
29
29
  it('equals expected type', function () {
30
- expectTypeOf(path).toEqualTypeOf<T>()
30
+ expectTypeOf<P>().toEqualTypeOf<T>()
31
31
  })
32
32
  })
33
33
  })
34
34
 
35
35
  describe('list', function () {
36
- let path: '$' | `$.${number}`
36
+ type P = '$' | `$.${number}`
37
37
 
38
38
  describe('mutable', function () {
39
39
  const builder = list(stringType)
40
40
  type T = PathsOfType<typeof builder>
41
41
 
42
42
  it('equals expected type', function () {
43
- expectTypeOf(path).toEqualTypeOf<T>()
43
+ expectTypeOf<P>().toEqualTypeOf<T>()
44
44
  })
45
45
  })
46
46
 
@@ -49,7 +49,7 @@ describe('PathsOfType', function () {
49
49
  type T = PathsOfType<typeof builder>
50
50
 
51
51
  it('equals expected type', function () {
52
- expectTypeOf(path).toEqualTypeOf<T>()
52
+ expectTypeOf<P>().toEqualTypeOf<T>()
53
53
  })
54
54
  })
55
55
 
@@ -58,7 +58,7 @@ describe('PathsOfType', function () {
58
58
  type T = PathsOfType<typeof builder>
59
59
 
60
60
  it('equals expected type', function () {
61
- expectTypeOf(path).toEqualTypeOf<T>()
61
+ expectTypeOf<P>().toEqualTypeOf<T>()
62
62
  })
63
63
  })
64
64
 
@@ -66,22 +66,22 @@ describe('PathsOfType', function () {
66
66
  const builder = list(stringType)
67
67
  type T = PathsOfType<typeof builder, 'o'>
68
68
 
69
- let path: '$' | `$.o`
69
+ type P = '$' | `$.o`
70
70
  it('equals expected type', function () {
71
- expectTypeOf(path).toEqualTypeOf<T>()
71
+ expectTypeOf<P>().toEqualTypeOf<T>()
72
72
  })
73
73
  })
74
74
  })
75
75
 
76
76
  describe('record', function () {
77
- let path: '$' | `$.${string}` | `$.${number}`
77
+ type P = '$' | `$.${string}` | `$.${number}`
78
78
 
79
79
  describe('mutable', function () {
80
80
  const builder = record(stringType)
81
81
  type T = PathsOfType<typeof builder>
82
82
 
83
83
  it('equals expected type', function () {
84
- expectTypeOf(path).toEqualTypeOf<T>()
84
+ expectTypeOf<P>().toEqualTypeOf<T>()
85
85
  })
86
86
  })
87
87
 
@@ -89,9 +89,9 @@ describe('PathsOfType', function () {
89
89
  const builder = record<typeof stringType, 'a' | 'b'>(stringType)
90
90
  type T = PathsOfType<typeof builder>
91
91
 
92
- let path: '$' | '$.a' | '$.b'
92
+ type P = '$' | '$.a' | '$.b'
93
93
  it('equals expected type', function () {
94
- expectTypeOf(path).toEqualTypeOf<T>()
94
+ expectTypeOf<P>().toEqualTypeOf<T>()
95
95
  })
96
96
  })
97
97
 
@@ -99,9 +99,9 @@ describe('PathsOfType', function () {
99
99
  const builder = record<typeof stringType, 1 | 2 | 3>(stringType)
100
100
  type T = PathsOfType<typeof builder>
101
101
 
102
- let path: '$' | '$.1' | '$.2' | '$.3'
102
+ type P = '$' | '$.1' | '$.2' | '$.3'
103
103
  it('equals expected type', function () {
104
- expectTypeOf(path).toEqualTypeOf<T>()
104
+ expectTypeOf<P>().toEqualTypeOf<T>()
105
105
  })
106
106
  })
107
107
 
@@ -110,7 +110,7 @@ describe('PathsOfType', function () {
110
110
  type T = PathsOfType<typeof builder>
111
111
 
112
112
  it('equals expected type', function () {
113
- expectTypeOf(path).toEqualTypeOf<T>()
113
+ expectTypeOf<P>().toEqualTypeOf<T>()
114
114
  })
115
115
  })
116
116
 
@@ -119,7 +119,7 @@ describe('PathsOfType', function () {
119
119
  type T = PathsOfType<typeof builder>
120
120
 
121
121
  it('equals expected type', function () {
122
- expectTypeOf(path).toEqualTypeOf<T>()
122
+ expectTypeOf<P>().toEqualTypeOf<T>()
123
123
  })
124
124
  })
125
125
 
@@ -128,7 +128,7 @@ describe('PathsOfType', function () {
128
128
  type T = PathsOfType<typeof builder>
129
129
 
130
130
  it('equals expected type', function () {
131
- expectTypeOf(path).toEqualTypeOf<T>()
131
+ expectTypeOf<P>().toEqualTypeOf<T>()
132
132
  })
133
133
  })
134
134
 
@@ -136,9 +136,9 @@ describe('PathsOfType', function () {
136
136
  const builder = record(stringType)
137
137
  type T = PathsOfType<typeof builder, 'x'>
138
138
 
139
- let path: '$' | '$.x'
139
+ type P = '$' | '$.x'
140
140
  it('equals expected type', function () {
141
- expectTypeOf(path).toEqualTypeOf<T>()
141
+ expectTypeOf<P>().toEqualTypeOf<T>()
142
142
  })
143
143
  })
144
144
  })
@@ -151,9 +151,9 @@ describe('PathsOfType', function () {
151
151
  .field('s', stringType)
152
152
  type T = PathsOfType<typeof builder>
153
153
 
154
- let path: '$' | '$.n' | '$.b' | '$.s'
154
+ type P = '$' | '$.n' | '$.b' | '$.s'
155
155
  it('equals expected type', function () {
156
- expectTypeOf(path).toEqualTypeOf<T>()
156
+ expectTypeOf<P>().toEqualTypeOf<T>()
157
157
  })
158
158
 
159
159
  it('can be used in a record', function () {
@@ -171,7 +171,7 @@ describe('PathsOfType', function () {
171
171
 
172
172
  it('ignores override', function () {
173
173
  type T = PathsOfType<typeof builder, 'y'>
174
- expectTypeOf(path).toEqualTypeOf<T>()
174
+ expectTypeOf<P>().toEqualTypeOf<T>()
175
175
  })
176
176
  })
177
177
 
@@ -181,9 +181,9 @@ describe('PathsOfType', function () {
181
181
  .field('s2', object().field('a2', stringType))
182
182
  type T = PathsOfType<typeof builder>
183
183
 
184
- let path: '$' | '$.s1' | '$.s1.a1' | '$.s2' | '$.s2.a2'
184
+ type P = '$' | '$.s1' | '$.s1.a1' | '$.s2' | '$.s2.a2'
185
185
  it('equals expected type', function () {
186
- expectTypeOf(path).toEqualTypeOf<T>()
186
+ expectTypeOf<P>().toEqualTypeOf<T>()
187
187
  })
188
188
  })
189
189
 
@@ -194,18 +194,18 @@ describe('PathsOfType', function () {
194
194
  describe('no override', function () {
195
195
  type T = PathsOfType<typeof builder>
196
196
 
197
- let path: '$' | '$.l' | `$.l.${number}`
197
+ type P = '$' | '$.l' | `$.l.${number}`
198
198
  it('equals expected type', function () {
199
- expectTypeOf(path).toEqualTypeOf<T>()
199
+ expectTypeOf<P>().toEqualTypeOf<T>()
200
200
  })
201
201
  })
202
202
 
203
203
  describe('passes override', function () {
204
204
  type T = PathsOfType<typeof builder, 'o'>
205
205
 
206
- let path: '$' | '$.l' | '$.l.o'
206
+ type P = '$' | '$.l' | '$.l.o'
207
207
  it('equals expected type', function () {
208
- expectTypeOf(path).toEqualTypeOf<T>()
208
+ expectTypeOf<P>().toEqualTypeOf<T>()
209
209
  })
210
210
  })
211
211
  })
@@ -218,9 +218,9 @@ describe('PathsOfType', function () {
218
218
  .or('2', stringType)
219
219
  type T = PathsOfType<typeof builder>
220
220
 
221
- let path: '$'
221
+ type P = '$'
222
222
  it('equals expected type', function () {
223
- expectTypeOf(path).toEqualTypeOf<T>()
223
+ expectTypeOf<P>().toEqualTypeOf<T>()
224
224
  })
225
225
  })
226
226
 
@@ -231,9 +231,9 @@ describe('PathsOfType', function () {
231
231
  .or('3', object().field('c', stringType).field('a', stringType))
232
232
  type T = PathsOfType<typeof builder>
233
233
 
234
- let path: '$' | '$.a' | '$.b' | '$.c'
234
+ type P = '$' | '$.a' | '$.b' | '$.c'
235
235
  it('equals expected type', function () {
236
- expectTypeOf(path).toEqualTypeOf<T>()
236
+ expectTypeOf<P>().toEqualTypeOf<T>()
237
237
  })
238
238
  })
239
239
 
@@ -249,9 +249,9 @@ describe('PathsOfType', function () {
249
249
  ))
250
250
  type T = PathsOfType<typeof builder>
251
251
 
252
- let path: '$' | '$.a' | '$.a.aa' | '$.b' | '$.b.bb'
252
+ type P = '$' | '$.a' | '$.a.aa' | '$.b' | '$.b.bb'
253
253
  it('equals expected type', function () {
254
- expectTypeOf(path).toEqualTypeOf<T>()
254
+ expectTypeOf<P>().toEqualTypeOf<T>()
255
255
  })
256
256
  })
257
257
  })
@@ -263,10 +263,10 @@ describe('PathsOfType', function () {
263
263
 
264
264
  type T = PathsOfType<typeof builder>
265
265
 
266
- let path: '$' | '$.1:a' | '$.2:b'
266
+ type P = '$' | '$.1:a' | '$.2:b'
267
267
 
268
268
  it('equals expected type', function () {
269
- expectTypeOf(path).toEqualTypeOf<T>()
269
+ expectTypeOf<P>().toEqualTypeOf<T>()
270
270
  })
271
271
  })
272
272
 
@@ -283,10 +283,10 @@ describe('PathsOfType', function () {
283
283
 
284
284
  type T = PathsOfType<typeof builder>
285
285
 
286
- let path: '$' | '$.1:p:a' | '$.2:q:b'
286
+ type P = '$' | '$.1:p:a' | '$.2:q:b'
287
287
 
288
288
  it('equals expected type', function () {
289
- expectTypeOf(path).toEqualTypeOf<T>()
289
+ expectTypeOf<P>().toEqualTypeOf<T>()
290
290
  })
291
291
  })
292
292
 
@@ -13,14 +13,14 @@ describe('ReadonlyTypeDefOf', function () {
13
13
  describe('literal', function () {
14
14
  type T = ReadonlyTypeOfType<typeof numberType._type>
15
15
 
16
- let t: {
16
+ type C = {
17
17
  readonly definition: {
18
18
  readonly type: TypeDefType.Literal,
19
19
  readonly valuePrototype: [number],
20
20
  },
21
21
  }
22
22
  it('equals expected type', function () {
23
- expectTypeOf(t).toEqualTypeOf<T>()
23
+ expectTypeOf<C>().toEqualTypeOf<T>()
24
24
  })
25
25
  })
26
26
 
@@ -28,7 +28,7 @@ describe('ReadonlyTypeDefOf', function () {
28
28
  const builder = list(numberType)
29
29
  type T = ReadonlyTypeOfType<typeof builder._type>
30
30
 
31
- let t: {
31
+ type C = {
32
32
  readonly definition: {
33
33
  readonly type: TypeDefType.List,
34
34
  readonly elements: {
@@ -38,7 +38,7 @@ describe('ReadonlyTypeDefOf', function () {
38
38
  },
39
39
  }
40
40
  it('equals expected type', function () {
41
- expectTypeOf(t).toEqualTypeOf<T>()
41
+ expectTypeOf<C>().toEqualTypeOf<T>()
42
42
  })
43
43
  })
44
44
 
@@ -46,7 +46,7 @@ describe('ReadonlyTypeDefOf', function () {
46
46
  const builder = record<typeof numberType, 'a' | 'b'>(numberType)
47
47
  type T = ReadonlyTypeOfType<typeof builder._type>
48
48
 
49
- let t: {
49
+ type C = {
50
50
  readonly definition: {
51
51
  readonly type: TypeDefType.Record,
52
52
  readonly keyPrototype: 'a' | 'b',
@@ -57,7 +57,7 @@ describe('ReadonlyTypeDefOf', function () {
57
57
  },
58
58
  }
59
59
  it('equals expected type', function () {
60
- expectTypeOf(t).toEqualTypeOf<T>()
60
+ expectTypeOf<C>().toEqualTypeOf<T>()
61
61
  })
62
62
  })
63
63
 
@@ -67,7 +67,7 @@ describe('ReadonlyTypeDefOf', function () {
67
67
  .optionalField('b', stringType)
68
68
  type T = ReadonlyTypeOfType<typeof builder._type>
69
69
 
70
- let t: {
70
+ type C = {
71
71
  readonly definition: {
72
72
  readonly type: TypeDefType.Object,
73
73
  readonly fields: {
@@ -83,7 +83,7 @@ describe('ReadonlyTypeDefOf', function () {
83
83
  },
84
84
  }
85
85
  it('equals expected type', function () {
86
- expectTypeOf(t).toEqualTypeOf<T>()
86
+ expectTypeOf<C>().toEqualTypeOf<T>()
87
87
  })
88
88
  })
89
89
 
@@ -93,7 +93,7 @@ describe('ReadonlyTypeDefOf', function () {
93
93
  .or('2', stringType)
94
94
  type T = ReadonlyTypeOfType<typeof builder._type>
95
95
 
96
- let t: {
96
+ type C = {
97
97
  readonly definition: {
98
98
  readonly type: TypeDefType.Union,
99
99
  readonly discriminator: null,
@@ -114,7 +114,7 @@ describe('ReadonlyTypeDefOf', function () {
114
114
  },
115
115
  }
116
116
  it('equals expected type', function () {
117
- expectTypeOf(t).toEqualTypeOf<T>()
117
+ expectTypeOf<C>().toEqualTypeOf<T>()
118
118
  })
119
119
  })
120
120
 
@@ -122,7 +122,7 @@ describe('ReadonlyTypeDefOf', function () {
122
122
  const builder = record<typeof numberType, 'a'>(numberType).partialKeys()
123
123
  type T = ReadonlyTypeOfType<typeof builder._type>
124
124
 
125
- let t: {
125
+ type C = {
126
126
  readonly definition: {
127
127
  readonly type: TypeDefType.Record,
128
128
  readonly keyPrototype: 'a',
@@ -133,7 +133,7 @@ describe('ReadonlyTypeDefOf', function () {
133
133
  },
134
134
  }
135
135
  it('equals expected type', function () {
136
- expectTypeOf(t).toEqualTypeOf<T>()
136
+ expectTypeOf<C>().toEqualTypeOf<T>()
137
137
  })
138
138
  })
139
139
 
@@ -141,7 +141,7 @@ describe('ReadonlyTypeDefOf', function () {
141
141
  const builder = record<typeof numberType, 'a'>(numberType).readonlyKeys()
142
142
  type T = ReadonlyTypeOfType<typeof builder._type>
143
143
 
144
- let t: {
144
+ type C = {
145
145
  readonly definition: {
146
146
  readonly type: TypeDefType.Record,
147
147
  readonly keyPrototype: 'a',
@@ -152,7 +152,7 @@ describe('ReadonlyTypeDefOf', function () {
152
152
  },
153
153
  }
154
154
  it('equals expected type', function () {
155
- expectTypeOf(t).toEqualTypeOf<T>()
155
+ expectTypeOf<C>().toEqualTypeOf<T>()
156
156
  })
157
157
  })
158
158
  })
@@ -151,11 +151,11 @@ describe('Strict Definitions', function () {
151
151
  },
152
152
  },
153
153
  }
154
- type C = StrictUnionTypeDef<null, U>
154
+ type S = StrictUnionTypeDef<null, U>
155
155
 
156
- let t: UnionTypeDef<null, U>
156
+ type C = UnionTypeDef<null, U>
157
157
  it('equals type', function () {
158
- expectTypeOf(t).toEqualTypeOf<C>()
158
+ expectTypeOf<S>().toEqualTypeOf<C>()
159
159
  })
160
160
  })
161
161
  })
@@ -174,11 +174,11 @@ describe('Strict Definitions', function () {
174
174
  },
175
175
  },
176
176
  }
177
- type C = StrictUnionTypeDef<null, U>
177
+ type S = StrictUnionTypeDef<null, U>
178
178
 
179
- let t: UnionTypeDef<null, U>
179
+ type C = UnionTypeDef<null, U>
180
180
  it('equals type', function () {
181
- expectTypeOf<C>().not.toMatchTypeOf(t)
181
+ expectTypeOf<C>().not.toMatchTypeOf<S>()
182
182
  })
183
183
  })
184
184
  })
@@ -9,7 +9,7 @@ describe('TypeOfType', function () {
9
9
  describe('literal', function () {
10
10
  const literalType = numberType
11
11
  type T = TypeOfType<typeof literalType>
12
- let t: {
12
+ type C = {
13
13
  readonly definition: {
14
14
  readonly type: TypeDefType.Literal,
15
15
  readonly valuePrototype: [number],
@@ -17,7 +17,7 @@ describe('TypeOfType', function () {
17
17
  }
18
18
 
19
19
  it('equals expected type', function () {
20
- expectTypeOf<T>().toEqualTypeOf(t)
20
+ expectTypeOf<T>().toEqualTypeOf<C>()
21
21
  })
22
22
  })
23
23
 
@@ -25,7 +25,7 @@ describe('TypeOfType', function () {
25
25
  describe('mutable', function () {
26
26
  const listType = list(numberType)
27
27
  type T = TypeOfType<typeof listType>
28
- let t: {
28
+ type C = {
29
29
  readonly definition: {
30
30
  readonly type: TypeDefType.List,
31
31
  elements: {
@@ -35,13 +35,13 @@ describe('TypeOfType', function () {
35
35
  },
36
36
  }
37
37
  it('equals expected type', function () {
38
- expectTypeOf<T>().toEqualTypeOf(t)
38
+ expectTypeOf<T>().toEqualTypeOf<C>()
39
39
  })
40
40
  })
41
41
  describe('readonly', function () {
42
42
  const listType = list(numberType).readonlyElements()
43
43
  type T = TypeOfType<typeof listType>
44
- let t: {
44
+ type C = {
45
45
  readonly definition: {
46
46
  readonly type: TypeDefType.List,
47
47
  readonly elements: {
@@ -51,7 +51,7 @@ describe('TypeOfType', function () {
51
51
  },
52
52
  }
53
53
  it('equals expected type', function () {
54
- expectTypeOf<T>().toEqualTypeOf(t)
54
+ expectTypeOf<T>().toEqualTypeOf<C>()
55
55
  })
56
56
  })
57
57
  })