-
Notifications
You must be signed in to change notification settings - Fork 3
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
Be less dependent on axios #4
Comments
Maybe this still possible with classes, because classes can have generic methods and can themselves be generic parameters. But maybe we don't want per-agent response type at all, but always want native |
Native If you want to reject axios, I think we should create another npm module for that |
TLDR: I think axios is slowly becoming a "jQuery". I think people use axios mostly because:
I would like to argue that it's not really. Response and AxiosResponse have mostly the same interface, with only notable exceptions being:
|
Judging by axios/axios#4209, there is intent in axios to support web streams. |
Motivation:
TL;DR
Current problems are:
AxiosResponse
generic.Axios can not be peer dependency because TypeScript does not work well with peer dependencies.Not a problem anymore, was solved by also having it as dev dependency.Details
To be independent of axios, we have to be able to arbitrarily wrap response types (e.g.
Pet
intoAxiosResponse<Pet>
).But TypeScript does not support:
ReturnType
of generic function.So far I could not find a way around that.
The text was updated successfully, but these errors were encountered: