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
Exported classes in type definition are not actually exported #5031
Comments
I guess that's a duplicate of #5004 |
Issue not fixed: Classes are still not exported in the |
+1 I am getting this error with
|
Having the same issue with import { CanceledError } from 'axios';
console.log(CanceledError); // undefined And |
Others like AxiosProgressEvent seem to be fine As a workaround for now I used axios.AxiosError, so for example: if (error instanceof axios.AxiosError) { got the idea from this ticket: #5062 |
Another workaround is the use of 'axios.isAxiosError' |
* chore: add necessary devDependencies for rollup build * fix: keep top-level export same with static properties(#5031) Co-authored-by: ronggui.shu <ronggui.shu@sci-inv.com> Co-authored-by: Jay <jasonsaayman@gmail.com>
Describe the bug
AxiosHeaders
,AxiosError
,CanceledError
andAxios
are "exported" in the type definitionsindex.d.ts
, but not exported in the module.To Reproduce
Expected behavior
Types are not exported, but only declared (declare class
instead ofexport class
).Classes are exported and can be imported and used like so:
Environment
Additional context/Screenshots
none
The text was updated successfully, but these errors were encountered: