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.
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”TMsg = unknown
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ActorRef<
TMsg>():ActorRef<TMsg>
Returns
Section titled “Returns”ActorRef<TMsg>
Properties
Section titled “Properties”
abstractreadonlypath:ActorPath
Defined in: src/ActorRef.ts:10
Methods
Section titled “Methods”equals()
Section titled “equals()”equals(
other):boolean
Defined in: src/ActorRef.ts:26
Parameters
Section titled “Parameters”ActorRef
Returns
Section titled “Returns”boolean
kill()
Section titled “kill()”kill():
void
Defined in: src/ActorRef.ts:22
Kill this actor — raises ActorKilledError through the normal supervision path.
Returns
Section titled “Returns”void
send()
Section titled “send()”send(
message):void
Defined in: src/ActorRef.ts:16
Alias for tell — useful if you want to pipe something.
Parameters
Section titled “Parameters”message
Section titled “message”TMsg
Returns
Section titled “Returns”void
stop()
Section titled “stop()”stop():
void
Defined in: src/ActorRef.ts:19
Gracefully stop this actor after it drains its mailbox.
Returns
Section titled “Returns”void
tell()
Section titled “tell()”
abstracttell(message,sender?):void
Defined in: src/ActorRef.ts:13
Send a message to this actor. sender is surfaced as context.sender in the recipient.
Parameters
Section titled “Parameters”message
Section titled “message”TMsg
sender?
Section titled “sender?”ActorRef<unknown> | null
Returns
Section titled “Returns”void
toString()
Section titled “toString()”toString():
string
Defined in: src/ActorRef.ts:24
Returns
Section titled “Returns”string