@whitesev/utils 1.5.7 → 1.5.8
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.amd.js.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/src/Httpx.d.ts +1 -1
- package/package.json +1 -1
- package/src/Httpx.ts +2 -1
package/dist/src/Httpx.d.ts
CHANGED
|
@@ -1162,7 +1162,7 @@ declare class Httpx {
|
|
|
1162
1162
|
* @param errorFn 设置的响应后回调函数,如果返回响应,则使用返回的响应,如果返回null|undefined,则阻止响应
|
|
1163
1163
|
* + 超出 2xx 范围的状态码都会触发该函数
|
|
1164
1164
|
*/
|
|
1165
|
-
use(successFn?: <T extends HttpxAsyncResultData>(response:
|
|
1165
|
+
use(successFn?: <T extends HttpxAsyncResultData>(response: T, details: HttpxDetails) => void | T, errorFn?: <T extends HttpxHookErrorData>(data: T) => void | T): string | undefined;
|
|
1166
1166
|
/**
|
|
1167
1167
|
* 移除拦截器
|
|
1168
1168
|
* @param id 通过use返回的id
|
package/package.json
CHANGED
package/src/Httpx.ts
CHANGED
|
@@ -2127,7 +2127,8 @@ class Httpx {
|
|
|
2127
2127
|
*/
|
|
2128
2128
|
use(
|
|
2129
2129
|
successFn?: <T extends HttpxAsyncResultData>(
|
|
2130
|
-
response:
|
|
2130
|
+
response: T,
|
|
2131
|
+
details: HttpxDetails
|
|
2131
2132
|
) => void | T,
|
|
2132
2133
|
errorFn?: <T extends HttpxHookErrorData>(data: T) => void | T
|
|
2133
2134
|
) {
|