Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

@reactor/data — rpcbuilder

@reactor/data


@reactor/data / RpcBuilder

Defined in: rpc.ts:30

RPC builder for type-safe function calls.

Args extends Record<string, unknown>

Returns

new RpcBuilder<Args, Returns>(ctx, functionName): RpcBuilder<Args, Returns>

Defined in: rpc.ts:35

RequestContext

string

RpcBuilder<Args, Returns>

abortSignal(signal): this

Defined in: rpc.ts:47

Provide an AbortSignal

AbortSignal

this


call(args): this

Defined in: rpc.ts:41

Set function arguments

Args

this


headers(headers): this

Defined in: rpc.ts:53

Set custom headers

Record<string, string>

this


then<TResult1, TResult2>(onfulfilled?, _onrejected?): Promise<TResult1 | TResult2>

Defined in: rpc.ts:59

Execute the RPC call

TResult1 = Result<Returns>

TResult2 = never

((value) => TResult1 | PromiseLike<TResult1>) | null

((reason) => TResult2 | PromiseLike<TResult2>) | null

Promise<TResult1 | TResult2>


throwOnError(): Promise<Returns>

Defined in: rpc.ts:80

Throw on error

Promise<Returns>