Skip to content

Commit b5f26b7

Browse files
fix(types): fixed env config types; (#7020)
1 parent 0d8ad6e commit b5f26b7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

index.d.cts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,11 @@ declare namespace axios {
424424
env?: {
425425
FormData?: new (...args: any[]) => object;
426426
fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
427-
Request?: new (input: (RequestInfo | URL), init?: RequestInit) => Request;
428-
Response?: new (body?: (BodyInit | null), init?: ResponseInit) => Response;
427+
Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
428+
Response?: new (
429+
body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
430+
init?: ResponseInit
431+
) => Response;
429432
};
430433
formSerializer?: FormSerializerOptions;
431434
family?: AddressFamily;

index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,11 @@ export interface AxiosRequestConfig<D = any> {
356356
env?: {
357357
FormData?: new (...args: any[]) => object;
358358
fetch?: (input: URL | Request | string, init?: RequestInit) => Promise<Response>;
359-
Request?: new (input: (RequestInfo | URL), init?: RequestInit) => Request;
360-
Response?: new (body?: (BodyInit | null), init?: ResponseInit) => Response;
359+
Request?: new (input: URL | Request | string, init?: RequestInit) => Request;
360+
Response?: new (
361+
body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null,
362+
init?: ResponseInit
363+
) => Response;
361364
};
362365
formSerializer?: FormSerializerOptions;
363366
family?: AddressFamily;

0 commit comments

Comments
 (0)