Allow typing the body of a RequestError
response
#2312
Labels
enhancement
This change will extend Got features
good for beginner
This issue is easy to fix
✭ help wanted ✭
What problem are you trying to solve?
I want to type the response body of a
RequestError
. Currently becauseRequestError
does not accept a generic it's impossible to type the underlying response body.A valid workaround at the moment is something like:
This way ☝️ the
body
would be typed properly.Describe the feature
I would like to be able to inject a type to the
Request
, like so 👇whereby
T
is the type fo pass along to the respective response body.Checklist
The text was updated successfully, but these errors were encountered: