import { type CrossChannel } from "https://deno.land/x/rimbu@1.2.0/channel/main/index.ts";
const { Constructors } = CrossChannel;
Defines the static CrossChannel
API.
Methods
createPair<TSend = void, TReceive = TSend>(config?: CrossChannel.Config): CrossChannel.Pair<TSend, TReceive>
Returns a pair of connected CrossChannels of which the send module of the first is connected to the receive module of the second, and the send module of the second is connected to the receive module of the first.
combine<TSend = void, TReceive = TSend>(writeCh: Channel.Write<TSend>, readCh: Channel.Read<TReceive>): CrossChannel<TSend, TReceive>
Returns a CrossChannel where the send module comprises the given writeCh
, and the receive module
conists of the given readCh
.