Skip to main content

interface RemoteObject.Constructors

Defines the static RemoteObject API.

Properties​

Error​

Object containing the possible remote object errors.

Definition​

get Error(): typeof RemoteObjectError;

Methods​

createClient​

Returns a new RpcProxy that can be used to perform remote operations on a RemoteObject server.

Definition​

createClient<T>(commCh: RemoteObject.ClientCrossChannel): RpcProxy<T>;

Type parameters​

NameDescription
Tthe remote object interface type

Parameters​

NameTypeDescription
commChRemoteObject.ClientCrossChannelthe cross-channel to use for communication

createServer​

Creates a remote object server that allows clients to perform remote operations on the given source object.

Definition​

createServer<T>(source: T, commCh: RemoteObject.ServerCrossChannel): Promise<void>;

Type parameters​

NameDescription
Tthe type of the object to serve remotely

Parameters​

NameTypeDescription
sourceT
commChRemoteObject.ServerCrossChannelthe cross-channel to use for communication