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
Currently, if a message wants to get response, the way to do that is to use ProtocolWithReturn<data, responseValue>.
But it's possible to infer the type passing a regular function type, and inferring the data-argument and response-value from the type.
Oh wow that's so much cleaner and easier to understand...
Great recommendation! I'll see if I can support this without a breaking change, but I doubt that will be possible. I'll try and release v2 sometime today with this change.
Currently, if a message wants to get response, the way to do that is to use ProtocolWithReturn<data, responseValue>.
But it's possible to infer the type passing a regular function type, and inferring the data-argument and response-value from the type.
Instead of:
To infer like this:
The text was updated successfully, but these errors were encountered: