From c9b035b548e673057b2007dce1d0f4b088b9e6d5 Mon Sep 17 00:00:00 2001 From: Eulentier <63156923+Eulentier161@users.noreply.github.com> Date: Mon, 20 Jan 2025 23:33:23 +0100 Subject: [PATCH] feat: generic argument for rpc.call (#9) providing an optional generic for the `rpc.call` function to grant a user the ability to specify the expected return type. --- rpc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc.ts b/rpc.ts index 7f3ecc7..5ffd59e 100644 --- a/rpc.ts +++ b/rpc.ts @@ -35,7 +35,7 @@ export class RPC implements RPCInterface { //Network information related /** The function that sends the RPC POST request */ - async call(payload: Record): Promise> { + async call>(payload: Record): Promise { if (this.debug) console.log(JSON.stringify(payload)); const resp = await fetch(this.rpc_url, { method: "POST",