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
The infered type R = AxiosResponse<T> must be the 3rd paramter since the T (Response Type) and D (Request Parameters Type) are sufficient to fix the fully determine.
Example Code
Currently, if we wish to define the body data type as well, we have to define 3 types. The 2nd parameter should be infered
This discussion was converted from issue #5638 on September 04, 2023 14:08.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the issue
The post method has the following type:
The infered type
R = AxiosResponse<T>
must be the 3rd paramter since theT
(Response Type) andD
(Request Parameters Type) are sufficient to fix the fully determine.Example Code
Currently, if we wish to define the body data type as well, we have to define 3 types. The 2nd parameter should be infered
Expected behavior
The ordering of the paramters must change:
so that only two types are required to strongly fix the type and ignore the infered type.
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
Beta Was this translation helpful? Give feedback.
All reactions