You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a machine that invokes multiple actors, when sending events to child actors via the actor.getSnapshot().children.childActor.send() method, the type for the event argument is an intersection of all invoked actors event types. This prevents the ability to pass events that are unique to the applicable actor.
This only applies to the TS types. The child actor behaves as expected when passed an event that fails the TS type.
Expected result
For a machine invoking multiple child actors, when attempting to send an event to a child actor the event argument should accept any valid event for the applicable child actor.
Actual result
The only allowed events are the events shared across all child actors.
XState version
XState version 5
Description
For a machine that invokes multiple actors, when sending events to child actors via the
actor.getSnapshot().children.childActor.send()
method, the type for the event argument is an intersection of all invoked actors event types. This prevents the ability to pass events that are unique to the applicable actor.This only applies to the TS types. The child actor behaves as expected when passed an event that fails the TS type.
Expected result
For a machine invoking multiple child actors, when attempting to send an event to a child actor the event argument should accept any valid event for the applicable child actor.
Actual result
The only allowed events are the events shared across all child actors.
Reproduction
https://stackblitz.com/edit/github-2obepf?file=src%2FfeedbackMachine.ts&view=editor
Additional context
No response
The text was updated successfully, but these errors were encountered: