@whitesev/utils 2.4.4 → 2.4.5
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/types/src/types/Httpx.d.ts +3 -4
- package/package.json +1 -1
- package/src/Httpx.ts +1 -1
- package/src/types/Httpx.d.ts +3 -4
|
@@ -1241,10 +1241,9 @@ export declare interface HttpxResponseData<T extends HttpxRequestOption> {
|
|
|
1241
1241
|
/**
|
|
1242
1242
|
* 响应内容,根据responseType,如果是html,那就是Document类型,如果是json,那么类型是Object类型
|
|
1243
1243
|
*/
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
: T["responseType"];
|
|
1244
|
+
response: T["responseType"] extends keyof HttpxResponseTypeMap
|
|
1245
|
+
? HttpxResponseTypeMap[T["responseType"]]
|
|
1246
|
+
: HttpxResponseTypeMap["html"];
|
|
1248
1247
|
/**
|
|
1249
1248
|
* 当请求头fetch为true时,该属性存在
|
|
1250
1249
|
*/
|
package/package.json
CHANGED
package/src/Httpx.ts
CHANGED
package/src/types/Httpx.d.ts
CHANGED
|
@@ -1241,10 +1241,9 @@ export declare interface HttpxResponseData<T extends HttpxRequestOption> {
|
|
|
1241
1241
|
/**
|
|
1242
1242
|
* 响应内容,根据responseType,如果是html,那就是Document类型,如果是json,那么类型是Object类型
|
|
1243
1243
|
*/
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
: T["responseType"];
|
|
1244
|
+
response: T["responseType"] extends keyof HttpxResponseTypeMap
|
|
1245
|
+
? HttpxResponseTypeMap[T["responseType"]]
|
|
1246
|
+
: HttpxResponseTypeMap["html"];
|
|
1248
1247
|
/**
|
|
1249
1248
|
* 当请求头fetch为true时,该属性存在
|
|
1250
1249
|
*/
|