effect-rpc
    Preparing search index...

    Function makeRPCRequest

    • Makes a request for a specific request within a given RPC group. It builds up the request and executes it, returning the response.

      Reusable function for the client and the server.

      Type Parameters

      • T extends RpcGroup<any>
      • K extends string | number | symbol

      Parameters

      • rpcGroup: T

        The RPC group to get the client from.

      • requestName: K

        The name of the request to get the client for.

      Returns (payload: Parameters<InferClient<T>[K]>[0]) => ReturnType<InferClient<T>[K]>

      A function that takes the request payload and returns the response.