Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/saurpc/mod.ts>client.Client

saurpc is a tiny set of functions and types to make strongly-typed RPC easily manageable across TypeScript projects.
Go to Latest
class client.Client
import { client } from "https://deno.land/x/saurpc@0.1.1/mod.ts";
const { Client } = client;

Constructors

new
Client(endpoint: string | URL)

Type Parameters

T extends Procedures

Methods

call<S extends ProcedureName<T>>(
procedureName: S,
args: Parameters<T[S]>,
opts?: { headers: Headers | [string, string][] | Record<string, string>; },
): Promise<ReturnType<T[S]> | ProcedureError>