Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve typing of timeout in index.d.ts #4934

Merged
merged 2 commits into from Sep 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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