callProcedure
callProcedure<
T
,P
>(instance
,strategy
,procedure
,request
):Promise
<ProcedureResponse
<T
,P
>>
Defined in: astrobase/src/rpc/client/client-strategy.ts:45
Calls a procedure.
Type Parameters
Section titled “Type Parameters”T
extends ProcedureTypes
The ProcedureTypes to infer types from.
P
extends string
The procedure name string as a type.
Parameters
Section titled “Parameters”instance
Section titled “instance”The Instance config to pass to the ClientStrategy.
strategy
Section titled “strategy”The ClientStrategy to use to call the procedure.
procedure
Section titled “procedure”P
The procedure name.
request
Section titled “request”ProcedureRequest
<T
, P
>
The procedure request data.
Returns
Section titled “Returns”Promise
<ProcedureResponse
<T
, P
>>
The procedure result data.
Throws
Section titled “Throws”If the procedure is not supported or if the strategy throws for any reason.