Pular para o conteúdo
Português (BR)

ActorClassOrFactory

Este conteúdo não está disponível em sua língua ainda.

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

Defined in: src/Actor.ts:211

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