Skip to content

Commit

Permalink
🐞 fix(修复Httpx的intercept的响应successFn的回调缺失第二个参数问题):
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteSevs committed Jun 23, 2024
1 parent ed3294a commit 6c5b1e8
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 库/Utils/dist/index.amd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 库/Utils/dist/index.cjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 库/Utils/dist/index.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 库/Utils/dist/index.iife.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 库/Utils/dist/index.system.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 库/Utils/dist/index.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 库/Utils/dist/src/Httpx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ declare class Httpx {
* @param errorFn 设置的响应后回调函数,如果返回响应,则使用返回的响应,如果返回null|undefined,则阻止响应
* + 超出 2xx 范围的状态码都会触发该函数
*/
use(successFn?: <T extends HttpxAsyncResultData>(response: HttpxAsyncResultData) => void | T, errorFn?: <T extends HttpxHookErrorData>(data: T) => void | T): string | undefined;
use(successFn?: <T extends HttpxAsyncResultData>(response: T, details: HttpxDetails) => void | T, errorFn?: <T extends HttpxHookErrorData>(data: T) => void | T): string | undefined;
/**
* 移除拦截器
* @param id 通过use返回的id
Expand Down
2 changes: 1 addition & 1 deletion 库/Utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@whitesev/utils",
"version": "1.5.7",
"version": "1.5.8",
"description": "一个常用的工具库",
"main": "dist/index.cjs.js",
"module": "dist/node/index.esm.js",
Expand Down
3 changes: 2 additions & 1 deletion 库/Utils/src/Httpx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2127,7 +2127,8 @@ class Httpx {
*/
use(
successFn?: <T extends HttpxAsyncResultData>(
response: HttpxAsyncResultData
response: T,
details: HttpxDetails
) => void | T,
errorFn?: <T extends HttpxHookErrorData>(data: T) => void | T
) {
Expand Down

0 comments on commit 6c5b1e8

Please sign in to comment.