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

fix(type): add AxiosError to AxiosStatic #4654

Merged
merged 3 commits into from May 3, 2022

Conversation

xiaoyu-tamu
Copy link
Contributor

@xiaoyu-tamu xiaoyu-tamu commented Apr 28, 2022

https://github.com/axios/axios/blob/master/lib/axios.js#L47

Instructions

Please read and follow the instructions before creating and submitting a pull request:

  • Create an issue explaining the feature. It could save you some effort in case we don't consider it should be included in axios.
  • If you're fixing a bug, try to commit the failing test/s and the code fixing it in different commits.
  • Ensure you're following our contributing guide.

⚠️👆 Delete the instructions before submitting the pull request 👆⚠️

Describe your pull request here.

Copy link
Member

@jasonsaayman jasonsaayman left a comment

Thanks for the pull request

@jasonsaayman jasonsaayman merged commit 8213da4 into axios:master May 3, 2022
3 checks passed
@enapupe
Copy link

enapupe commented May 11, 2022

Can we see that into a release? ❤️

@GuichiZhao
Copy link

GuichiZhao commented Oct 8, 2022

It is not a good idea, "Class" is sort of specially in typescript, it can be used as both type and value, by putting AxiosError as static, there is no way to use AxiosError as type. On the other hand, by import {AxiosError} from 'axios' there is no way to use AxiosError as value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants