Skip to content

Commit

Permalink
Improve typing of timeout in index.d.ts (#4934)
Browse files Browse the repository at this point in the history
Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
mrcwbr and jasonsaayman committed Sep 28, 2022
1 parent 25a5669 commit 0959c5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.d.ts
Expand Up @@ -266,6 +266,8 @@ export interface AxiosProgressEvent {
download?: boolean;
}

type Milliseconds = number;

export interface AxiosRequestConfig<D = any> {
url?: string;
method?: Method | string;
Expand All @@ -276,7 +278,7 @@ export interface AxiosRequestConfig<D = any> {
params?: any;
paramsSerializer?: ParamsSerializerOptions;
data?: D;
timeout?: number;
timeout?: Milliseconds;
timeoutErrorMessage?: string;
withCredentials?: boolean;
adapter?: AxiosAdapter;
Expand Down

0 comments on commit 0959c5c

Please sign in to comment.