runcheck 0.54.0 → 0.54.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.
- package/dist/runcheck.d.ts +5 -2
- package/package.json +1 -1
package/dist/runcheck.d.ts
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
declare function rc_get_from_key_as_fallback<T extends RcType<any>>(fallbackKey: string, type: T): RcType<RcInferType<T>>;
|
|
6
6
|
type RcObject = {
|
|
7
|
-
[key: string]: RcBase<any, any> | RcObject | [
|
|
7
|
+
[key: string]: RcBase<any, any> | RcObject | [
|
|
8
|
+
'optional' | 'nullish_or' | 'null_or' | 'array' | 'loose_array',
|
|
9
|
+
RcObject
|
|
10
|
+
];
|
|
8
11
|
};
|
|
9
12
|
type TypeOfObjectType<T extends RcObject> = Flatten<AddQuestionMarks<{
|
|
10
13
|
[K in keyof T]: T[K] extends RcType<infer U> ? RequiredKey<U> : T[K] extends RcOptionalKeyType<infer W> ? W : T[K] extends RcObject ? RequiredKey<TypeOfObjectType<T[K]>> : never;
|
|
@@ -48,7 +51,7 @@ type StrictObjTypeToRcType<T> = {
|
|
|
48
51
|
};
|
|
49
52
|
type StricTypeToRcType<T> = [
|
|
50
53
|
T
|
|
51
|
-
] extends [any[]] ? RcTypeWithSquemaEqualTo<T> | ['array' | 'loose_array',
|
|
54
|
+
] extends [Record<string, any>[]] ? RcTypeWithSquemaEqualTo<T> | ['array' | 'loose_array', StrictObjTypeToRcType<T[number]>] : [T] extends [any[]] ? RcTypeWithSquemaEqualTo<T> : [T] extends [Record<string, any>] ? StrictObjTypeToRcType<T> | RcTypeWithSquemaEqualTo<T> : [T] extends [Record<string, any> | null] ? [
|
|
52
55
|
'null_or',
|
|
53
56
|
StrictObjTypeToRcType<T>
|
|
54
57
|
] | RcTypeWithSquemaEqualTo<T> : [T] extends [Record<string, any> | undefined] ? [
|
package/package.json
CHANGED