API Reference
@univerjs
@univerjs/rpc
functions
Tomodule

@univerjs/rpc v0.4.2Docs


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

packages/rpc/src/services/rpc/rpc.service.ts:88 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.