Skip to content

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.

T extends ProcedureTypes

The ProcedureTypes to infer types from.

P extends string

The procedure name string as a type.

Instance

The Instance config to pass to the ClientStrategy.

ClientStrategy<T>

The ClientStrategy to use to call the procedure.

P

The procedure name.

ProcedureRequest<T, P>

The procedure request data.

Promise<ProcedureResponse<T, P>>

The procedure result data.

If the procedure is not supported or if the strategy throws for any reason.