Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark events internal to a machine #5026

Open
tkvw opened this issue Aug 9, 2024 · 0 comments
Open

Mark events internal to a machine #5026

tkvw opened this issue Aug 9, 2024 · 0 comments

Comments

@tkvw
Copy link

tkvw commented Aug 9, 2024

Created this issue on request of David following this question on discord

Feature request/Typescript

I am using a callback actor which uses sendBack to the parent machine, but to handle the events in the machine I need to add the events in the setup events type. This is fine, but will also expose these events as being valid events to be send to the machine by an outside actor.
Maybe an additional type internalEvents on the setup type?
something like:

type TEvents = ..
type TInternalEvents = TEvents | ...
setup({
   types: {} as {
       events: TEvents,
       internalEvents: TInternalEvents
   }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant