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.
Files changed (2) hide show
  1. package/dist/index.d.ts +8 -4
  2. 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 = any, Result = any>(handle: ServiceHandle<Params, Result>) => ServiceHandle<Params, Result>;
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 = any, Result = any> = undefined extends Params ? ServiceHandleNoParams<Params, Result> : ServiceHandleHasParams<Params, Result>;
160
+ declare type ServiceHandle<Params, Result> = EmptyParamsType extends Params ? ServiceHandleNoParams<Result> : ServiceHandleHasParams<Params, Result>;
157
161
 
158
- declare type ServiceHandleHasParams<Params = any, Result = any> = (params: Params, config?: Record<string, any>) => Promise<Result>;
162
+ declare type ServiceHandleHasParams<Params, Result> = (params: Params, config?: Record<string, any>) => Promise<Result>;
159
163
 
160
- declare type ServiceHandleNoParams<Params = any, Result = any> = (params?: Params, config?: Record<string, any>) => Promise<Result>;
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.21",
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.23"
40
+ "zf-utilz": "^0.1.26"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^20.12.7",