mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Improve typing of timeout in index.d.ts (#4934)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Vendored
+3
-1
@@ -266,6 +266,8 @@ export interface AxiosProgressEvent {
|
|||||||
download?: boolean;
|
download?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Milliseconds = number;
|
||||||
|
|
||||||
export interface AxiosRequestConfig<D = any> {
|
export interface AxiosRequestConfig<D = any> {
|
||||||
url?: string;
|
url?: string;
|
||||||
method?: Method | string;
|
method?: Method | string;
|
||||||
@@ -276,7 +278,7 @@ export interface AxiosRequestConfig<D = any> {
|
|||||||
params?: any;
|
params?: any;
|
||||||
paramsSerializer?: ParamsSerializerOptions;
|
paramsSerializer?: ParamsSerializerOptions;
|
||||||
data?: D;
|
data?: D;
|
||||||
timeout?: number;
|
timeout?: Milliseconds;
|
||||||
timeoutErrorMessage?: string;
|
timeoutErrorMessage?: string;
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
adapter?: AxiosAdapter;
|
adapter?: AxiosAdapter;
|
||||||
|
|||||||
Reference in New Issue
Block a user