interface RemoteChannel.Constructors
Defines the static RemoteChannel
API.
Methods
createCross
Resolves to a new cross-channel RemoteChannel using the given configuration.
createCross
Definition
createCross<TSend = void, TReceive = TSend>(port:
RemoteChannel.SimpleMessagePort
, config:
RemoteChannel.CrossConfig
): Promise<
CrossChannel
<TSend, TReceive>>;
Type parameters
Name | Default | Description |
---|---|---|
TSend | void | the send message type |
TReceive | TSend | the receive message type |
Parameters
Name | Type | Description |
---|---|---|
port | RemoteChannel.SimpleMessagePort | |
config | RemoteChannel.CrossConfig | the channel configuration |
createRead
Resolves to a new read-only RemoteChannel using the given configuration.
createRead
Definition
createRead<T = void>(port:
RemoteChannel.SimpleMessagePort
, config:
RemoteChannel.ReadConfig
): Promise<
Channel.Read
<T>>;
Type parameters
Name | Default | Description |
---|---|---|
T | void | the message type |
Parameters
Name | Type | Description |
---|---|---|
port | RemoteChannel.SimpleMessagePort | |
config | RemoteChannel.ReadConfig | the channel configuration |
createWrite
Resolves to a new write-only RemoteChannel using the given configuration.
createWrite
Definition
createWrite<T = void>(port:
RemoteChannel.SimpleMessagePort
, config:
RemoteChannel.WriteConfig
): Promise<
Channel.Write
<T>>;
Type parameters
Name | Default | Description |
---|---|---|
T | void | the message type |
Parameters
Name | Type | Description |
---|---|---|
port | RemoteChannel.SimpleMessagePort | |
config | RemoteChannel.WriteConfig | the channel configuration |