Is there a specific method I should use on a `Chan...
# coroutines
j
Is there a specific method I should use on a
Channel
to cast it to a type allowing me only to send/offer? The same way there is
receiveAsFlow
to only be able to collect it, how can I restrict my code to only sending?
a
You can cast it as
SendChannel<T>
or
ReceiveChannel<T>
.
👍 1
j
Thanks!
👍 1