wenay-common 1.0.178 → 1.0.180
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.
|
@@ -52,6 +52,13 @@ export type tMethodToPromise2<T extends object> = {
|
|
|
52
52
|
export type tMethodToPromise4<T extends object> = {
|
|
53
53
|
[P in keyof T]: T[P] extends ((...args: infer Z) => infer X) ? X extends Promise<any> ? T[P] : (...args: Z) => Promise<X> : T[P] extends object ? tMethodToPromise4<T[P]> : T[P];
|
|
54
54
|
};
|
|
55
|
+
type tt5<T extends any> = T extends Promise<infer R> ? R : T;
|
|
56
|
+
export type tMethodToPromise5<T extends object> = {
|
|
57
|
+
[P in keyof T]: T[P] extends ((...args: infer Z) => infer X) ? (...args: Z) => Promise<tt5<X>> : T[P] extends object ? tMethodToPromise5<T[P]> : never;
|
|
58
|
+
};
|
|
59
|
+
export type tMethodToPromise6<T extends object> = {
|
|
60
|
+
[P in keyof T]: T[P] extends ((...args: infer Z) => infer X) ? (...args: Z) => Promise<tt5<X>> : T[P] extends object ? tMethodToPromise6<T[P]> : T[P];
|
|
61
|
+
};
|
|
55
62
|
type tAndB<T> = {
|
|
56
63
|
data: T;
|
|
57
64
|
void: () => void;
|
|
@@ -85,10 +92,10 @@ export declare function CreatAPIFacadeClient<T extends object>({ socketKey, sock
|
|
|
85
92
|
limit?: number;
|
|
86
93
|
}): {
|
|
87
94
|
api: screenerSocApi<any>;
|
|
88
|
-
func:
|
|
89
|
-
space:
|
|
90
|
-
all:
|
|
91
|
-
strictly:
|
|
95
|
+
func: tMethodToPromise5<typeVoid2<T>>;
|
|
96
|
+
space: tMethodToPromise5<typeNoVoid2<T>>;
|
|
97
|
+
all: tMethodToPromise5<T>;
|
|
98
|
+
strictly: tMethodToPromise6<T>;
|
|
92
99
|
infoStrictly(): any;
|
|
93
100
|
strictlyInit(obj?: object): Promise<unknown>;
|
|
94
101
|
};
|
package/lib/Exchange/CParams.js
CHANGED
|
@@ -132,11 +132,12 @@ function GetSimpleParams(params) {
|
|
|
132
132
|
simpleParams[key] =
|
|
133
133
|
typeof (param) == "function" ? param() :
|
|
134
134
|
typeof (param) != "object" ? param :
|
|
135
|
-
param
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
param.value instanceof
|
|
139
|
-
|
|
135
|
+
param == null ? null :
|
|
136
|
+
param.enabled == false ? null :
|
|
137
|
+
typeof (param.value) != "object" ? param.value :
|
|
138
|
+
param.value instanceof Array ? (param.value.filter((item, i) => Array.isArray(param.elementsEnabled) ? param.elementsEnabled[i] : param.elementsEnabled != false)) :
|
|
139
|
+
param.value instanceof Date ? new Date(param.value) :
|
|
140
|
+
GetSimpleParams(param.value);
|
|
140
141
|
}
|
|
141
142
|
return simpleParams;
|
|
142
143
|
}
|