rxtutils 1.1.4-beta.12 → 1.1.4-beta.13
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/cjs/request/index.d.ts +2 -2
- package/es/request/index.d.ts +2 -2
- package/package.json +1 -1
package/cjs/request/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ interface Options<Params = any, Data = any> {
|
|
|
83
83
|
* 可以配置错误码对应的错误信息或处理函数
|
|
84
84
|
* @default {} 空对象,使用默认处理函数
|
|
85
85
|
*/
|
|
86
|
-
errorCodeMap?: Record<string, string | ((code: string, data: Data, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => ErrorHandlerReturnType<Data> | void)>;
|
|
86
|
+
errorCodeMap?: Record<string, string | ((code: string, data: Data, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => ErrorHandlerReturnType<Data> | void | Promise<ErrorHandlerReturnType<Data> | void>)>;
|
|
87
87
|
/**
|
|
88
88
|
* 默认错误码处理函数
|
|
89
89
|
* 当错误码不在 errorCodeMap 中时调用
|
|
@@ -99,7 +99,7 @@ interface Options<Params = any, Data = any> {
|
|
|
99
99
|
* 可以配置 HTTP 状态码对应的错误信息或处理函数
|
|
100
100
|
* @default {} 空对象,使用默认处理函数
|
|
101
101
|
*/
|
|
102
|
-
httpErrorCodeMap?: Record<string, string | ((code: number, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => Promise<ErrorHandlerReturnType<Data> | void>)>;
|
|
102
|
+
httpErrorCodeMap?: Record<string, string | ((code: number, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => (ErrorHandlerReturnType<Data> | void | Promise<ErrorHandlerReturnType<Data> | void>))>;
|
|
103
103
|
/**
|
|
104
104
|
* 默认 HTTP 错误码处理函数
|
|
105
105
|
* 当 HTTP 状态码不在 httpErrorCodeMap 中时调用
|
package/es/request/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ interface Options<Params = any, Data = any> {
|
|
|
83
83
|
* 可以配置错误码对应的错误信息或处理函数
|
|
84
84
|
* @default {} 空对象,使用默认处理函数
|
|
85
85
|
*/
|
|
86
|
-
errorCodeMap?: Record<string, string | ((code: string, data: Data, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => ErrorHandlerReturnType<Data> | void)>;
|
|
86
|
+
errorCodeMap?: Record<string, string | ((code: string, data: Data, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => ErrorHandlerReturnType<Data> | void | Promise<ErrorHandlerReturnType<Data> | void>)>;
|
|
87
87
|
/**
|
|
88
88
|
* 默认错误码处理函数
|
|
89
89
|
* 当错误码不在 errorCodeMap 中时调用
|
|
@@ -99,7 +99,7 @@ interface Options<Params = any, Data = any> {
|
|
|
99
99
|
* 可以配置 HTTP 状态码对应的错误信息或处理函数
|
|
100
100
|
* @default {} 空对象,使用默认处理函数
|
|
101
101
|
*/
|
|
102
|
-
httpErrorCodeMap?: Record<string, string | ((code: number, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => Promise<ErrorHandlerReturnType<Data> | void>)>;
|
|
102
|
+
httpErrorCodeMap?: Record<string, string | ((code: number, res: AxiosResponse<Data>, requestParam: RequestOptions<Params>) => (ErrorHandlerReturnType<Data> | void | Promise<ErrorHandlerReturnType<Data> | void>))>;
|
|
103
103
|
/**
|
|
104
104
|
* 默认 HTTP 错误码处理函数
|
|
105
105
|
* 当 HTTP 状态码不在 httpErrorCodeMap 中时调用
|