# Type Alias ActorConn<AD>

ActorConn: ActorConnRaw & ActorDefinitionActions<AD>

Connection to a actor. Allows calling actor's remote procedure calls with inferred types. See ActorConnRaw for underlying methods.

#### Type Parameters

- AD extends AnyActorDefinition

  The actor class that this connection is for.

#### Example

    const room = client.connect<ChatRoom>(...etc...);
    // This calls the action named `sendMessage` on the `ChatRoom` actor.
    await room.sendMessage('Hello, world!');

Private methods (e.g. those starting with `_`) are automatically excluded.

#### See

ActorConnRaw

- Defined in rivetkit-typescript/packages/rivetkit/src/client/actor-conn.ts:965