When using Axios client the TypeScript generated types are incorrect with latest version of axios@0.27.2
See original GitHub issueHere is an example of the error message from the generated request.ts
core file.
TS2322: Type 'AxiosResponse<unknown, any>' is not assignable to type 'AxiosResponse<T, any>'.
Type 'unknown' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'.
return axiosError.response;
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Typescript imports not working · Issue #5082 · axios ... - GitHub
It doesn't work since v1.0.0 (0.27.2 works fine with the same codebase), importing axios results in an undefined variable. Any idea what to...
Read more >Type Error In axios/index.d.ts After Updating From TS 4.6.4 to ...
As the title says, I updated a few dependencies tonight, and now I get an error when I use the npx tsc command....
Read more >axios/CHANGELOG.md - UNPKG
This badge will show the version on CDNJS! 463, - Documentation update to clear up ambiguity in code examples ([#2928](https://github ...
Read more >How to use Axios with Vue.js - LogRocket Blog
The promise-based HTTP client Axios can be used with Vue, a simple frontend JavaScript framework, to create web applications.
Read more >cannot read properties of undefined (reading 'post') axios
Note: If you wanted to really use Axios via this.axios , you should add it to the Vue prototype, ... I installed version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Truth be told we just switched to OpenAPI Generator. It’s definitely clunkier than this repo but for our specific requirements it was a neater fit anyway.
Ah ok, thanks for the tip!