Replies: 2 comments 2 replies
-
@wendux @jgoyvaerts What do you guys think? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Even we strict the generic type to T, the T itself extends |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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>()
=>T
dio.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
Beta Was this translation helpful? Give feedback.
All reactions