Skip to main content
Module

x/rimbu/channel/mod.ts>RemoteChannel.Constructors

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
interface RemoteChannel.Constructors
import { type RemoteChannel } from "https://deno.land/x/rimbu@1.0.2/channel/mod.ts";
const { Constructors } = RemoteChannel;

Defines the static RemoteChannel API.

Methods

createRead<T = void>(port: RemoteChannel.SimpleMessagePort, config: RemoteChannel.ReadConfig): Promise<Channel.Read<T>>

Resolves to a new read-only RemoteChannel using the given configuration.

createWrite<T = void>(port: RemoteChannel.SimpleMessagePort, config: RemoteChannel.WriteConfig): Promise<Channel.Write<T>>

Resolves to a new write-only RemoteChannel using the given configuration.

createCross<TSend = void, TReceive = TSend>(port: RemoteChannel.SimpleMessagePort, config: RemoteChannel.CrossConfig): Promise<CrossChannel<TSend, TReceive>>

Resolves to a new cross-channel RemoteChannel using the given configuration.