From 84696a7f9ed3a0d7ec06b738a649b130bcb3a648 Mon Sep 17 00:00:00 2001 From: Marco Weber <49274286+mrcwbr@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:35:28 +0200 Subject: [PATCH] Improve typing of timeout in index.d.ts --- index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index ba39648842..4b721dea45 100644 --- a/index.d.ts +++ b/index.d.ts @@ -200,6 +200,8 @@ export interface AxiosProgressEvent { download?: boolean; } +type Milliseconds = number; + export interface AxiosRequestConfig { url?: string; method?: Method | string; @@ -210,7 +212,7 @@ export interface AxiosRequestConfig { params?: any; paramsSerializer?: ParamsSerializerOptions; data?: D; - timeout?: number; + timeout?: Milliseconds; timeoutErrorMessage?: string; withCredentials?: boolean; adapter?: AxiosAdapter;