@strictly/define 0.0.5 → 0.0.7

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 (30) hide show
  1. package/.out/tsconfig.tsbuildinfo +1 -1
  2. package/.out/types/specs/flattened_accessors_of_type.tests.js +1 -2
  3. package/.out/types/specs/flattened_types_of_type.tests.js +8 -16
  4. package/.out/types/specs/flattened_validators_of_validating_type.tests.js +2 -4
  5. package/.out/types/specs/flattened_values_of_type.tests.js +2 -4
  6. package/.out/types/specs/partial_type_of_type.tests.js +6 -12
  7. package/.out/types/specs/paths_of_type.tests.js +23 -39
  8. package/.out/types/specs/readonly_type_of_type.tests.js +7 -14
  9. package/.out/types/specs/strict_definitions.tests.js +2 -4
  10. package/.out/types/specs/type_of_type.tests.js +3 -6
  11. package/.out/types/specs/value_of_type.tests.js +13 -26
  12. package/.out/types/specs/value_to_type_paths_of_type.tests.js +8 -16
  13. package/.out/validation/specs/errors_of_validators.tests.js +1 -2
  14. package/.out/validation/specs/validators_of_values.tests.js +3 -6
  15. package/.turbo/turbo-build.log +5 -5
  16. package/.turbo/turbo-check-types.log +1 -1
  17. package/package.json +1 -1
  18. package/types/specs/flattened_accessors_of_type.tests.ts +2 -2
  19. package/types/specs/flattened_types_of_type.tests.ts +16 -16
  20. package/types/specs/flattened_validators_of_validating_type.tests.ts +4 -4
  21. package/types/specs/flattened_values_of_type.tests.ts +4 -4
  22. package/types/specs/partial_type_of_type.tests.ts +12 -12
  23. package/types/specs/paths_of_type.tests.ts +39 -39
  24. package/types/specs/readonly_type_of_type.tests.ts +14 -14
  25. package/types/specs/strict_definitions.tests.ts +6 -6
  26. package/types/specs/type_of_type.tests.ts +6 -6
  27. package/types/specs/value_of_type.tests.ts +26 -26
  28. package/types/specs/value_to_type_paths_of_type.tests.ts +16 -16
  29. package/validation/specs/errors_of_validators.tests.ts +2 -2
  30. package/validation/specs/validators_of_values.tests.ts +6 -6
@@ -19,11 +19,11 @@ describe('ValueToTypePathsOfType', function () {
19
19
  describe('literal', function () {
20
20
  type T = ValueToTypePathsOfType<typeof numberType.narrow>
21
21
 
22
- let t: {
22
+ type C = {
23
23
  readonly $: '$',
24
24
  }
25
25
  it('equals expected type', function () {
26
- expectTypeOf(t).toEqualTypeOf<T>()
26
+ expectTypeOf<C>().toEqualTypeOf<T>()
27
27
  })
28
28
  })
29
29
 
@@ -31,13 +31,13 @@ describe('ValueToTypePathsOfType', function () {
31
31
  const builder = list(list(numberType))
32
32
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder.narrow>>
33
33
 
34
- let t: {
34
+ type C = {
35
35
  readonly $: '$',
36
36
  readonly [_: `$.${number}`]: '$.*',
37
37
  readonly [_: `$.${number}.${number}`]: '$.*.*',
38
38
  }
39
39
  it('equals expected type', function () {
40
- expectTypeOf(t).toEqualTypeOf<T>()
40
+ expectTypeOf<C>().toEqualTypeOf<T>()
41
41
  })
42
42
  })
43
43
 
@@ -46,7 +46,7 @@ describe('ValueToTypePathsOfType', function () {
46
46
  const builder = record<typeof l, 'a' | 'b'>(l)
47
47
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder>>
48
48
 
49
- let t: {
49
+ type C = {
50
50
  readonly $: '$',
51
51
  readonly [`$.a`]: '$.*',
52
52
  readonly [`$.b`]: '$.*',
@@ -54,7 +54,7 @@ describe('ValueToTypePathsOfType', function () {
54
54
  readonly [_: `$.b.${number}`]: '$.*.*',
55
55
  }
56
56
  it('equals expected type', function () {
57
- expectTypeOf(t).toEqualTypeOf<T>()
57
+ expectTypeOf<C>().toEqualTypeOf<T>()
58
58
  })
59
59
 
60
60
  it('allows lookup of type path', function () {
@@ -71,7 +71,7 @@ describe('ValueToTypePathsOfType', function () {
71
71
 
72
72
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder>>
73
73
 
74
- let t: {
74
+ type C = {
75
75
  readonly $: '$',
76
76
  readonly [`$.a`]: '$.a',
77
77
  readonly [`$.b`]: '$.b',
@@ -80,7 +80,7 @@ describe('ValueToTypePathsOfType', function () {
80
80
  readonly [_: `$.a.${number}`]: '$.a.*',
81
81
  }
82
82
  it('equals expected type', function () {
83
- expectTypeOf(t).toEqualTypeOf<T>()
83
+ expectTypeOf<C>().toEqualTypeOf<T>()
84
84
  })
85
85
 
86
86
  it('has the same value paths', function () {
@@ -101,13 +101,13 @@ describe('ValueToTypePathsOfType', function () {
101
101
  .or('2', stringType)
102
102
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder>>
103
103
 
104
- let t: {
104
+ type C = {
105
105
  readonly $: '$',
106
106
  readonly [_: `$.${number}`]: '$.*',
107
107
  }
108
108
 
109
109
  it('equals expected type', function () {
110
- expectTypeOf(t).toEqualTypeOf<T>()
110
+ expectTypeOf<C>().toEqualTypeOf<T>()
111
111
  })
112
112
  })
113
113
 
@@ -117,7 +117,7 @@ describe('ValueToTypePathsOfType', function () {
117
117
  .or('2', object().field('x', numberType).field('y', stringType))
118
118
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder>>
119
119
 
120
- let t: {
120
+ type C = {
121
121
  readonly $: '$',
122
122
  readonly ['$.1:a']: '$.1:a',
123
123
  readonly ['$.1:b']: '$.1:b',
@@ -125,7 +125,7 @@ describe('ValueToTypePathsOfType', function () {
125
125
  readonly ['$.2:y']: '$.2:y',
126
126
  }
127
127
  it('equals expected type', function () {
128
- expectTypeOf(t).toEqualTypeOf<T>()
128
+ expectTypeOf<C>().toEqualTypeOf<T>()
129
129
  })
130
130
 
131
131
  it('has the same value paths', function () {
@@ -145,13 +145,13 @@ describe('ValueToTypePathsOfType', function () {
145
145
 
146
146
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder>>
147
147
 
148
- let t: {
148
+ type C = {
149
149
  readonly $: '$',
150
150
  readonly [_: `$.${number}`]: '$.*',
151
151
  readonly [_: `$.${number}.${number}`]: '$.*.*',
152
152
  }
153
153
  it('equals expected type', function () {
154
- expectTypeOf(t).toEqualTypeOf<T>()
154
+ expectTypeOf<C>().toEqualTypeOf<T>()
155
155
  })
156
156
  })
157
157
 
@@ -160,13 +160,13 @@ describe('ValueToTypePathsOfType', function () {
160
160
 
161
161
  type T = SimplifyDeep<ValueToTypePathsOfType<typeof builder>>
162
162
 
163
- let t: {
163
+ type C = {
164
164
  readonly $: '$',
165
165
  readonly [_: `$.${number}`]: '$.*',
166
166
  readonly [_: `$.${number}.${number}`]: '$.*.*',
167
167
  }
168
168
  it('equals expected type', function () {
169
- expectTypeOf(t).toEqualTypeOf<T>()
169
+ expectTypeOf<C>().toEqualTypeOf<T>()
170
170
  })
171
171
 
172
172
  it('has the same value paths', function () {
@@ -8,13 +8,13 @@ describe('ErrorsOfValidators', function () {
8
8
  y: Validator<number, 'b'>,
9
9
  }>
10
10
 
11
- let t: {
11
+ type C = {
12
12
  readonly x: 'a',
13
13
  readonly y: 'b',
14
14
  }
15
15
 
16
16
  it('equals expected type', function () {
17
- expectTypeOf<T>().toEqualTypeOf(t)
17
+ expectTypeOf<T>().toEqualTypeOf<C>()
18
18
  })
19
19
  })
20
20
  })
@@ -13,13 +13,13 @@ describe('FlattenedValidatorsOfType', function () {
13
13
  1
14
14
  >
15
15
 
16
- let t: {
16
+ type C = {
17
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
18
  readonly $: Validator<'a' | 'b' | 'c', any, '$', 1>,
19
19
  }
20
20
 
21
21
  it('has the expected type', function () {
22
- expectTypeOf<T>().toEqualTypeOf(t)
22
+ expectTypeOf<T>().toEqualTypeOf<C>()
23
23
  })
24
24
  })
25
25
 
@@ -36,7 +36,7 @@ describe('FlattenedValidatorsOfType', function () {
36
36
  2
37
37
  >
38
38
 
39
- let t: {
39
+ type C = {
40
40
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
41
  readonly $: Validator<number[], any, '$', 2>,
42
42
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -44,7 +44,7 @@ describe('FlattenedValidatorsOfType', function () {
44
44
  }
45
45
 
46
46
  it('has the expected type', function () {
47
- expectTypeOf<T>().toEqualTypeOf(t)
47
+ expectTypeOf<T>().toEqualTypeOf<C>()
48
48
  })
49
49
  })
50
50
 
@@ -56,13 +56,13 @@ describe('FlattenedValidatorsOfType', function () {
56
56
  }
57
57
  >
58
58
 
59
- let t: {
59
+ type C = {
60
60
  readonly $: Validator<number[]>,
61
61
  readonly '$.*': Validator<number>,
62
62
  }
63
63
 
64
64
  it('has the expected type', function () {
65
- expectTypeOf<T>().toEqualTypeOf(t)
65
+ expectTypeOf<T>().toEqualTypeOf<C>()
66
66
  })
67
67
  })
68
68
  })