-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support broadening or narrowing of types in Receiver
s and Sender
s
#262
Conversation
This allows broadening of the message type, such that receivers that stream narrow types can be typed as receivers streaming broader types. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
This allows narrowing of the message type, such that senders for sending broad types can be typed as senders for narrower types. Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I wonder what's the use case for this. This is the case I was thinking of when adding the |
Multiple senders from different sources could maybe use different specialized types for the same sender? |
OK, I see now this came because of this: |
This allows Receivers to reduce message types to be broader than actual, and senders to accept narrower types than required.