콘텐츠로 이동
한국어

ActorClassOrFactory

이 콘텐츠는 아직 번역되지 않았습니다.

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