Skip to main content
This release is 1 version behind 24.6.2 — the latest version of @rivet-gg/actor-client. Jump to latest

🔧 Rivet Actors have built-in RPC, state, and events — the easiest way to build modern applications.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
70%
Published
a month ago (24.6.1-rc.2)
method ActorHandleRaw.prototype.rpc
ActorHandleRaw.prototype.rpc<
Args extends Array<unknown> = unknown[],
Response = unknown,
>
(
name: string,
...args: Args,
): Promise<Response>

Call a raw RPC handle. See ActorHandle for type-safe RPC calls.

Type Parameters

Args extends Array<unknown> = unknown[]
  • The type of arguments to pass to the RPC function.
Response = unknown
  • The type of the response returned by the RPC function.

Parameters

name: string
  • The name of the RPC function to call.
...args: Args

Return Type

  • A promise that resolves to the response of the RPC function.

See

Add Package

deno add jsr:@rivet-gg/actor-client

Import symbol

import { ActorHandleRaw } from "@rivet-gg/actor-client";

---- OR ----

Import directly with a jsr specifier

import { ActorHandleRaw } from "jsr:@rivet-gg/actor-client";

Add Package

npx jsr add @rivet-gg/actor-client

Import symbol

import { ActorHandleRaw } from "@rivet-gg/actor-client";

Add Package

yarn dlx jsr add @rivet-gg/actor-client

Import symbol

import { ActorHandleRaw } from "@rivet-gg/actor-client";

Add Package

pnpm dlx jsr add @rivet-gg/actor-client

Import symbol

import { ActorHandleRaw } from "@rivet-gg/actor-client";

Add Package

bunx jsr add @rivet-gg/actor-client

Import symbol

import { ActorHandleRaw } from "@rivet-gg/actor-client";