@univerjs/rpc v0.5.0-beta.1Docs


Function: toModule()

function toModule<T>(channel): T

Wrap a channel into a service or a controller so it could be invoked by the upper layer modules. When the service or controller is called, it would request the remote server by calling the channel.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterType
channelIChannel

Returns

T

Defined in

submodules/univer/packages/rpc/src/services/rpc/rpc.service.ts:96