sendTo
Callable
Type parameters
- TContext: MachineContext
- TExpressionEvent: EventObject
- TParams: NonReducibleUnknown
- TTargetActor: AnyActorRef
- TEvent: EventObject
- TDelay: string
Parameters
to: string | TTargetActor | (args: ActionArgs<TContext, TExpressionEvent, TEvent>, params: TParams) => string | TTargetActor
eventOrExpr: ResolveEventType<TTargetActor> | SendExpr<TContext, TExpressionEvent, TParams, InferEvent<Cast<ResolveEventType<TTargetActor>, EventObject>>, TEvent>
optionaloptions: SendToActionOptions<TContext, TExpressionEvent, TParams, NoInfer<TEvent>, NoInfer<TDelay>>
Send action options
id
- The unique send event identifier (used withcancel()
).delay
- The number of milliseconds to delay the sending of the event.
Returns SendToAction<TContext, TExpressionEvent, TParams, TEvent, TDelay>
Sends an event to an actor.