forked from axios/axios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: export AxiosError class at top-level
Currently, there is no way to use AxiosError correctly. This was caused only by exporting the type at the top-level but the implementation deep inside the axios instance. Exported the AxiosError class at the top-level to fix inconsistencies. Refs: axios#5062 BREAKING CHANGE: AxiosError should be used from the top-level import rather than using it from the axios instance.
- Loading branch information
1 parent
facb32c
commit 477e0aa
Showing
3 changed files
with
27 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
import axios from './lib/axios.js'; | ||
export default axios; | ||
import axios from "./lib/axios.js"; | ||
import AxiosError from "./lib/core/AxiosError.js"; | ||
export { AxiosError }; | ||
export default axios; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters