@strictly/define 0.0.21 → 0.0.23
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.
- package/.out/transformers/flatteners/flatten_type_to.js +1 -1
- package/.out/transformers/flatteners/flatten_value_to.js +9 -9
- package/.out/transformers/flatteners/json_path.d.ts +1 -1
- package/.out/transformers/flatteners/json_path.js +2 -2
- package/.out/transformers/flatteners/specs/flatten_json_value_to_type_paths_of.tests.js +2 -2
- package/.out/transformers/flatteners/specs/flatten_type_to.tests.js +2 -2
- package/.out/transformers/flatteners/specs/flatten_value_to.tests.js +2 -2
- package/.out/transformers/flatteners/specs/json_paths.tests.js +2 -2
- package/.out/transformers/flatteners/specs/value_path_to_type_path.tests.js +82 -8
- package/.out/transformers/flatteners/value_path_to_type_path.js +26 -25
- package/.out/tsconfig.tsbuildinfo +1 -1
- package/.out/types/flattened_types_of_type.d.ts +11 -11
- package/.out/types/flattened_types_of_validating_type.d.ts +11 -11
- package/.out/types/paths_of_type.d.ts +7 -7
- package/.out/types/value_to_type_paths_of_type.d.ts +7 -7
- package/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-release$colon$exports.log +1 -1
- package/dist/index.cjs +52 -40
- package/dist/index.d.cts +37 -37
- package/dist/index.d.ts +37 -37
- package/dist/index.js +52 -40
- package/package.json +5 -3
- package/transformers/flatteners/flatten_type_to.ts +2 -2
- package/transformers/flatteners/flatten_value_to.ts +8 -12
- package/transformers/flatteners/json_path.ts +3 -3
- package/transformers/flatteners/specs/flatten_json_value_to_type_paths_of.tests.ts +2 -2
- package/transformers/flatteners/specs/flatten_type_to.tests.ts +2 -2
- package/transformers/flatteners/specs/flatten_value_to.tests.ts +2 -2
- package/transformers/flatteners/specs/json_paths.tests.ts +3 -3
- package/transformers/flatteners/specs/value_path_to_type_path.tests.ts +92 -8
- package/transformers/flatteners/value_path_to_type_path.ts +37 -23
- package/types/flattened_types_of_type.ts +7 -18
- package/types/flattened_types_of_validating_type.ts +7 -19
- package/types/paths_of_type.ts +16 -22
- package/types/specs/flattened_types_of_type.tests.ts +6 -6
- package/types/specs/paths_of_type.tests.ts +2 -2
- package/types/specs/value_to_type_paths_of_type.tests.ts +4 -4
- package/types/value_to_type_paths_of_type.ts +5 -12
|
@@ -40,14 +40,13 @@ type InternalFlattenedTypePathsOf<
|
|
|
40
40
|
& {
|
|
41
41
|
readonly [K in ValuePath]: TypePath
|
|
42
42
|
}
|
|
43
|
-
& InternalFlattenedTypePathsOfChildren<T, SegmentOverride, ValuePath, TypePath,
|
|
43
|
+
& InternalFlattenedTypePathsOfChildren<T, SegmentOverride, ValuePath, TypePath, Depth>
|
|
44
44
|
|
|
45
45
|
type InternalFlattenedTypePathsOfChildren<
|
|
46
46
|
T extends TypeDef,
|
|
47
47
|
SegmentOverride extends string,
|
|
48
48
|
ValuePath extends string,
|
|
49
49
|
TypePath extends string,
|
|
50
|
-
Qualifier extends string,
|
|
51
50
|
Depth extends number,
|
|
52
51
|
NextDepth extends number = Depths[Depth],
|
|
53
52
|
> = NextDepth extends -1 ? never
|
|
@@ -71,7 +70,6 @@ type InternalFlattenedTypePathsOfChildren<
|
|
|
71
70
|
SegmentOverride,
|
|
72
71
|
ValuePath,
|
|
73
72
|
TypePath,
|
|
74
|
-
Qualifier,
|
|
75
73
|
NextDepth
|
|
76
74
|
>
|
|
77
75
|
: T extends UnionTypeDef ? InternalFlattenedTypePathsOfUnionChildren<
|
|
@@ -79,7 +77,6 @@ type InternalFlattenedTypePathsOfChildren<
|
|
|
79
77
|
SegmentOverride,
|
|
80
78
|
ValuePath,
|
|
81
79
|
TypePath,
|
|
82
|
-
Qualifier,
|
|
83
80
|
NextDepth
|
|
84
81
|
>
|
|
85
82
|
: never
|
|
@@ -119,15 +116,14 @@ type InternalFlattenedTypePathsOfObjectChildren<
|
|
|
119
116
|
SegmentOverride extends string,
|
|
120
117
|
ValuePath extends string,
|
|
121
118
|
TypePath extends string,
|
|
122
|
-
Qualifier extends string,
|
|
123
119
|
Depth extends number,
|
|
124
120
|
> = T extends ObjectTypeDef<infer Fields> ? keyof Fields extends string ? UnionToIntersection<
|
|
125
121
|
{
|
|
126
122
|
readonly [K in keyof Fields]-?: InternalFlattenedTypePathsOf<
|
|
127
123
|
Exclude<Fields[K], undefined>,
|
|
128
124
|
SegmentOverride,
|
|
129
|
-
PathOf<ValuePath,
|
|
130
|
-
PathOf<TypePath,
|
|
125
|
+
PathOf<ValuePath, K>,
|
|
126
|
+
PathOf<TypePath, K>,
|
|
131
127
|
Depth
|
|
132
128
|
>
|
|
133
129
|
}[keyof Fields]
|
|
@@ -159,7 +155,6 @@ type InternalFlattenedTypePathsOfUnionChildren<
|
|
|
159
155
|
SegmentOverride extends string,
|
|
160
156
|
ValuePath extends string,
|
|
161
157
|
TypePath extends string,
|
|
162
|
-
Qualifier extends string,
|
|
163
158
|
Depth extends number,
|
|
164
159
|
> = T extends UnionTypeDef<infer D, infer Unions> ? keyof Unions extends string ? D extends null ? UnionToIntersection<{
|
|
165
160
|
readonly [K in keyof Unions]: InternalFlattenedTypePathsOfChildren<
|
|
@@ -167,7 +162,6 @@ type InternalFlattenedTypePathsOfUnionChildren<
|
|
|
167
162
|
SegmentOverride,
|
|
168
163
|
ValuePath,
|
|
169
164
|
TypePath,
|
|
170
|
-
'',
|
|
171
165
|
Depth
|
|
172
166
|
>
|
|
173
167
|
}[keyof Unions]>
|
|
@@ -175,9 +169,8 @@ type InternalFlattenedTypePathsOfUnionChildren<
|
|
|
175
169
|
readonly [K in keyof Unions]: InternalFlattenedTypePathsOfChildren<
|
|
176
170
|
Unions[K],
|
|
177
171
|
SegmentOverride,
|
|
178
|
-
ValuePath
|
|
179
|
-
TypePath
|
|
180
|
-
`${Qualifier}${K}:`,
|
|
172
|
+
`${ValuePath}:${K}`,
|
|
173
|
+
`${TypePath}:${K}`,
|
|
181
174
|
Depth
|
|
182
175
|
>
|
|
183
176
|
}[keyof Unions]>
|