Skip to content

Commit c120f44

Browse files
authored
Fixing 'progressEvent' type (axios#2851)
* Fix 'progressEvent' type * Update axios.ts
1 parent 885ada6 commit c120f44

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export interface AxiosRequestConfig {
5959
responseType?: ResponseType;
6060
xsrfCookieName?: string;
6161
xsrfHeaderName?: string;
62-
onUploadProgress?: (progressEvent: any) => void;
63-
onDownloadProgress?: (progressEvent: any) => void;
62+
onUploadProgress?: (progressEvent: ProgressEvent) => void;
63+
onDownloadProgress?: (progressEvent: ProgressEvent) => void;
6464
maxContentLength?: number;
6565
maxBodyLength?: number;
6666
validateStatus?: (status: number) => boolean;

test/typescript/axios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ const config: AxiosRequestConfig = {
3131
responseType: 'json',
3232
xsrfCookieName: 'XSRF-TOKEN',
3333
xsrfHeaderName: 'X-XSRF-TOKEN',
34-
onUploadProgress: (progressEvent: any) => {},
35-
onDownloadProgress: (progressEvent: any) => {},
34+
onUploadProgress: (progressEvent: ProgressEvent) => {},
35+
onDownloadProgress: (progressEvent: ProgressEvent) => {},
3636
maxContentLength: 2000,
3737
maxBodyLength: 2000,
3838
validateStatus: (status: number) => status >= 200 && status < 300,

0 commit comments

Comments
 (0)