Skip to content

TypedActorContext

Defined in: src/typed/TypedActorContext.ts:15

Typed variant of ActorContext — the runtime API exposed to Behaviors. Differs from the untyped ActorContext in two ways:

  • spawn takes a Behavior instead of Props
  • there is no become/unbecome — behavior changes happen by returning a new Behavior from the message handler.

T

readonly log: Logger

Defined in: src/typed/TypedActorContext.ts:19


readonly path: ActorPath

Defined in: src/typed/TypedActorContext.ts:17


readonly self: ActorRef<T>

Defined in: src/typed/TypedActorContext.ts:16


readonly system: ActorSystem

Defined in: src/typed/TypedActorContext.ts:18


readonly timers: TimerScheduler<T>

Defined in: src/typed/TypedActorContext.ts:32

Per-actor timers.

spawn<U>(behavior, name?): ActorRef<U>

Defined in: src/typed/TypedActorContext.ts:22

Spawn a typed child actor with the given Behavior.

U

Behavior<U>

string

ActorRef<U>


stop(ref): void

Defined in: src/typed/TypedActorContext.ts:25

Stop a watched child or self.

ActorRef

void


unwatch(ref): void

Defined in: src/typed/TypedActorContext.ts:29

ActorRef

void


watch(ref): void

Defined in: src/typed/TypedActorContext.ts:28

Death-watch another actor — you’ll receive a Signal when it terminates.

ActorRef

void