fromPromise
Callable
Type parameters
- TOutput
- TInput = NonReducibleUnknown
Parameters
promiseCreator: (__namedParameters: { input: TInput; self: ActorRef<PromiseSnapshot<TOutput, unknown>, { type: string }>; system: AnyActorSystem }) => PromiseLike<TOutput>
A function which returns a Promise, and accepts an object with the following properties:
input
- Data that was provided to the promise actorself
- The parent actor of the promise actorsystem
- The actor system to which the promise actor belongs
Returns PromiseActorLogic<TOutput, TInput>
An actor logic creator which returns promise logic as defined by an async process that resolves or rejects after some time.
Actors created from promise actor logic (“promise actors”) can:
Sending events to promise actors will have no effect.
docs for more information about how input is passed