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
Update Typings #379
Comments
As somebody trying to use Axios with TypeScript for about two weeks now, I'm still not sure whether it's better to use the
...To install the first-party ones and they seem to work far better. I'm considering writing a blog entry about using Axios with TypeScript if there's any appetite for it, but it would be nice to get some clarification on which definitions are ultimately the most, uh, definitive? 😅 |
I'm getting is one: Property 'defaults' does not exist on type 'AxiosStatic'. Kind regards, |
Just a heads up that I'm working on new definitions for axios. |
@nickuraltsev in that case, I'll wait until your finished, are you also providing typings for the defaults option? |
@JeroenNelen Yes, will do |
New TypeScript definitions have landed to master. |
I'm not sure if I'm suffering from typescript-newbie syndrome, but I had to modify the package.json file distributed with axios to include |
@ericeslinger The updates haven't been published to npm yet. #419 (comment) |
axios v0.14.0 has been released with these updates. Note: Please use the following import axios from 'axios';
axios.get('/foo')
.then(response => console.log(response))
.catch(error => console.log(error)); |
Hi, I know this one is closed, but I noticed I can no longer type the response like this:
Edit: httpClient is an axios instance here. I was using the @types/axios typing before and now use the typing that come with axios itself. Any reason we can no longer type the response? |
Ditto - is there any way to use the old typings that supported this? A sample of what I had set up looked like this:
Meaning, in turn, I could do:
And I would know that the response would be of type IProfile.. |
This is a catch all for the multiple requests to update the type definition. Needs to be done for the next release.
The text was updated successfully, but these errors were encountered: