Replies: 2 comments 2 replies
|
Even we strict the generic type to T, the T itself extends |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently we execute requests with
dio.get<T>()and the response data is always of typeT?.In the future we could respect the type hint and return response data of type
T.dio.get<T>()=>Tdio.get<T?>()=>T?For case 1 we would have to add error handling for the special case of the response unexpectedly being empty.
This would be a breaking change and thus would require a major version bump.
This was first raised in #1292
All reactions