Skip to content

ActorRef

Defined in: src/ActorRef.ts:9

Handle to an actor. The only way to interact with an actor — you never hold a direct reference to the Actor instance itself. tell() is fire-and- forget; ask() (see Ask.ts) provides a request/response Promise.

TMsg = unknown

new ActorRef<TMsg>(): ActorRef<TMsg>

ActorRef<TMsg>

abstract readonly path: ActorPath

Defined in: src/ActorRef.ts:10

equals(other): boolean

Defined in: src/ActorRef.ts:26

ActorRef

boolean


kill(): void

Defined in: src/ActorRef.ts:22

Kill this actor — raises ActorKilledError through the normal supervision path.

void


send(message): void

Defined in: src/ActorRef.ts:16

Alias for tell — useful if you want to pipe something.

TMsg

void


stop(): void

Defined in: src/ActorRef.ts:19

Gracefully stop this actor after it drains its mailbox.

void


abstract tell(message, sender?): void

Defined in: src/ActorRef.ts:13

Send a message to this actor. sender is surfaced as context.sender in the recipient.

TMsg

ActorRef<unknown> | null

void


toString(): string

Defined in: src/ActorRef.ts:24

string