@vtj/utils 0.8.119 → 0.8.121

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/utils",
3
3
  "private": false,
4
- "version": "0.8.119",
4
+ "version": "0.8.121",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@vtj/base": "~0.8.10"
@@ -85,6 +85,7 @@ export interface IRequestRecord {
85
85
  config: AxiosRequestConfig;
86
86
  source: CancelTokenSource;
87
87
  }
88
+ export type IRequest<R = any, D = any> = (config?: IRequestConfig<D>) => Promise<R>;
88
89
  export declare class Request {
89
90
  axios: AxiosInstance;
90
91
  settings: IRequestSettings;
@@ -111,8 +112,8 @@ export declare class Request {
111
112
  useRequest(onFulfilled?: ((value: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>) | null, onRejected?: ((error: any) => any) | null): () => void;
112
113
  private setupSkipWarn;
113
114
  }
114
- export interface IStaticRequest extends Request {
115
- (options: IRequestConfig): Promise<any>;
115
+ export interface IStaticRequest<R = any, D = any> extends Request {
116
+ (options: IRequestConfig<D>): Promise<R>;
116
117
  instance: Request;
117
118
  }
118
119
  export declare function createRequest(options?: IRequestOptions): IStaticRequest;
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/utils
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.8.119
5
+ * @version 0.8.121
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.8.119";
8
+ export declare const version = "0.8.121";