From 0959c5cbbbe12c4798cd4e133b651acd81892d46 Mon Sep 17 00:00:00 2001 From: Marco Weber <49274286+mrcwbr@users.noreply.github.com> Date: Wed, 28 Sep 2022 21:09:57 +0200 Subject: [PATCH] Improve typing of timeout in index.d.ts (#4934) Co-authored-by: Jay --- index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index a9cca311ac..e79e20f56b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -266,6 +266,8 @@ export interface AxiosProgressEvent { download?: boolean; } +type Milliseconds = number; + export interface AxiosRequestConfig { url?: string; method?: Method | string; @@ -276,7 +278,7 @@ export interface AxiosRequestConfig { params?: any; paramsSerializer?: ParamsSerializerOptions; data?: D; - timeout?: number; + timeout?: Milliseconds; timeoutErrorMessage?: string; withCredentials?: boolean; adapter?: AxiosAdapter;