axios
axios copied to clipboard
Extend use of concrete types in `AxiosRequestConfig` (replace `any`)
Is your feature request related to a problem? Please describe.
I'm using onDownloadProgress config on a request, and tried de-structuring the progressEvent which is of type any. I got an error from es-lint. Example code is attached:
const response = await axios.get(someUrl, {
onDownloadProgress: (progressEvent) => {
const { loaded, total } = progressEvent;
progressHandler.(Math.floor((loaded / total) * 100));
}
});
It was a bit frustrating and I ended up creating a partial interface for the response.
Describe the solution you'd like
Concrete types in 'AxiosRequestConfig'.