Перейти к содержимому
Русский

NobodyRef

Это содержимое пока не доступно на вашем языке.

Defined in: src/ActorRef.ts:123

The ref that means “no actor here”. Any message tell()‘d to Nobody is silently dropped (it does not even go to dead letters).

readonly path: ActorPath

Defined in: src/ActorRef.ts:125

ActorRef.path


readonly static instance: NobodyRef

Defined in: src/ActorRef.ts:124

ask<TRes>(message, timeoutMs?): Promise<TRes>

Defined in: src/ActorRef.ts:43

Request/response — send message and await the recipient’s reply. The framework synthesises a one-shot reply ref, injects it as both the sender slot and as message.replyTo, and resolves the returned promise with the first reply (or rejects with AskTimeoutError).

The caller never specifies replyTo on the message — the OmitReplyTo type subtracts it from the parameter type if the recipient declares it.

const value = await counter.ask<number>({ kind: 'get' });

TRes = unknown

unknown

number = 5_000

Promise<TRes>

ActorRef.ask


equals(other): boolean

Defined in: src/ActorRef.ts:67

ActorRef

boolean

ActorRef.equals


kill(): void

Defined in: src/ActorRef.ts:63

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

void

ActorRef.kill


send(message): void

Defined in: src/ActorRef.ts:30

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

unknown

void

ActorRef.send


stop(): void

Defined in: src/ActorRef.ts:60

Gracefully stop this actor after it drains its mailbox.

void

ActorRef.stop


tell(): void

Defined in: src/ActorRef.ts:127

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

void

ActorRef.tell


toString(): string

Defined in: src/ActorRef.ts:65

string

ActorRef.toString