コンテンツにスキップ
日本語

ActorClassOrFactory

このコンテンツはまだ日本語訳がありません。

ActorClassOrFactory<TMessage> = (new () => Actor<TMessage>) | ActorFactory<TMessage>

Defined in: src/Actor.ts:277

What every spawning API accepts: the actor class itself, or a factory that builds one.

The class form covers the common case — a constructor that takes no arguments needs no closure around it. The factory form is how dependencies get in (() => new Worker(database)), and it is also the escape hatch for anything the class form cannot express.

TMessage