@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/dist/index.cjs +7 -7
- package/dist/index.iife.js +16 -16
- package/dist/index.mjs +390 -385
- package/dist/index.umd.js +16 -16
- package/package.json +1 -1
- package/types/request.d.ts +3 -2
- package/types/version.d.ts +2 -2
package/package.json
CHANGED
package/types/request.d.ts
CHANGED
|
@@ -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<
|
|
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;
|
package/types/version.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
8
|
+
export declare const version = "0.8.121";
|