UNPKG

@connected/client

Version:

The hassle free way to call your server-side code

16 lines 653 B
import DataLoader from 'dataloader'; import type { JSONRPCRequest } from 'jayson'; import type { SerializableValue } from './types.js'; export type RpcTransferOptions = { url?: string; headers?: Record<string, string>; }; export default class RpcTransfer { private readonly rpcClient; private readonly dataLoaderMap; constructor(urlOrOptions?: string | RpcTransferOptions); findDataLoader(group?: string): DataLoader<JSONRPCRequest, any> | undefined; request(procName: string, params: Record<string, unknown>, group?: string): Promise<SerializableValue>; private batchRequest; } //# sourceMappingURL=rpc-transfer.d.ts.map