zf-dbs 0.1.21 → 0.1.22
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/index.d.ts +8 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -118,10 +118,14 @@ declare type DefineAppConfigOptions = Partial<AppConfig>;
|
|
|
118
118
|
|
|
119
119
|
export { defineRequest }
|
|
120
120
|
|
|
121
|
-
declare type DefineService = <Params =
|
|
121
|
+
declare type DefineService = <Params = EmptyParamsType, Result = EmptyResultType>(handle: ServiceHandle<Params, Result>) => ServiceHandle<Params, Result>;
|
|
122
122
|
|
|
123
123
|
export declare const defineService: DefineService;
|
|
124
124
|
|
|
125
|
+
declare type EmptyParamsType = undefined;
|
|
126
|
+
|
|
127
|
+
declare type EmptyResultType = any;
|
|
128
|
+
|
|
125
129
|
/**
|
|
126
130
|
* 使用配置
|
|
127
131
|
*/
|
|
@@ -153,11 +157,11 @@ declare class Polling<T = any> {
|
|
|
153
157
|
|
|
154
158
|
export declare const request: RequestInstance;
|
|
155
159
|
|
|
156
|
-
declare type ServiceHandle<Params
|
|
160
|
+
declare type ServiceHandle<Params, Result> = EmptyParamsType extends Params ? ServiceHandleNoParams<Result> : ServiceHandleHasParams<Params, Result>;
|
|
157
161
|
|
|
158
|
-
declare type ServiceHandleHasParams<Params
|
|
162
|
+
declare type ServiceHandleHasParams<Params, Result> = (params: Params, config?: Record<string, any>) => Promise<Result>;
|
|
159
163
|
|
|
160
|
-
declare type ServiceHandleNoParams<
|
|
164
|
+
declare type ServiceHandleNoParams<Result> = (params?: any, config?: Record<string, any>) => Promise<Result>;
|
|
161
165
|
|
|
162
166
|
export declare class Ue extends EventListener_2 {
|
|
163
167
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "zf-dbs",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.22",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"qs": "^6.12.1",
|
|
38
38
|
"vue": "^3.4.23",
|
|
39
39
|
"vue-router": "^4.3.2",
|
|
40
|
-
"zf-utilz": "^0.1.
|
|
40
|
+
"zf-utilz": "^0.1.26"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^20.12.7",
|