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:
spawntakes a Behavior instead of Props- there is no
become/unbecome— behavior changes happen by returning a new Behavior from the message handler.
Type Parameters
Section titled “Type Parameters”T
Properties
Section titled “Properties”
readonlylog:Logger
Defined in: src/typed/TypedActorContext.ts:19
readonlypath:ActorPath
Defined in: src/typed/TypedActorContext.ts:17
readonlyself:ActorRef<T>
Defined in: src/typed/TypedActorContext.ts:16
system
Section titled “system”
readonlysystem:ActorSystem
Defined in: src/typed/TypedActorContext.ts:18
timers
Section titled “timers”
readonlytimers:TimerScheduler<T>
Defined in: src/typed/TypedActorContext.ts:32
Per-actor timers.
Methods
Section titled “Methods”spawn()
Section titled “spawn()”spawn<
U>(behavior,name?):ActorRef<U>
Defined in: src/typed/TypedActorContext.ts:22
Spawn a typed child actor with the given Behavior.
Type Parameters
Section titled “Type Parameters”U
Parameters
Section titled “Parameters”behavior
Section titled “behavior”Behavior<U>
string
Returns
Section titled “Returns”ActorRef<U>
stop()
Section titled “stop()”stop(
ref):void
Defined in: src/typed/TypedActorContext.ts:25
Stop a watched child or self.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
unwatch()
Section titled “unwatch()”unwatch(
ref):void
Defined in: src/typed/TypedActorContext.ts:29
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
watch()
Section titled “watch()”watch(
ref):void
Defined in: src/typed/TypedActorContext.ts:28
Death-watch another actor — you’ll receive a Signal when it terminates.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void