Actor<M, A> constructor

Actor<M, A>(
  1. Handler<M, A> handler
)

Creates an Actor that handles messages with the given Handler.

Prefer to use the Actor.create constructor to avoid instantiating the Handler locally, unnecessarily.

Use the of constructor to wrap a function directly.

Implementation

Actor(Handler<M, A> handler) : this.create(() => handler);