You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue that is already proposing this?
I have searched the existing issues
Is your feature request related to a problem? Please describe it
Currently all methods of the HttpService take a <T = any> generic parameter, but type data?; any. It would be nice to enforce types on the data object that gets passed to either AxiosRequestConfig or the data parameter, respectively. This also allow it to be compliant with the types that Axios themselves have in their library.
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
Currently all methods of the HttpService take a
<T = any>
generic parameter, but typedata?; any
. It would be nice to enforce types on the data object that gets passed to eitherAxiosRequestConfig
or thedata
parameter, respectively. This also allow it to be compliant with the types that Axios themselves have in their library.Describe the solution you'd like
Retype the HttpService as follows:
This way with overloading, if we provide the type then
data
becomes required.Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
Just allowing the option to enforce stricter typing.
The text was updated successfully, but these errors were encountered: