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

Request (typescript): allow spawn of "unknown" or dynamic actors #4802

Open
karlanke opened this issue Mar 15, 2024 · 0 comments
Open

Request (typescript): allow spawn of "unknown" or dynamic actors #4802

karlanke opened this issue Mar 15, 2024 · 0 comments

Comments

@karlanke
Copy link

          @karlanke Currently, if you specify known `actors` in `setup(…)`, you can only reference those actors in `spawn`.

Maybe we can find some way to loosen this constraint (cc. @Andarist)

Originally posted by @davidkpiano in #4566 (comment)

I see the benefit here mostly for dynamic machines - if you know all of the actors up front, you might as well define them in setup() and get all the typing.

In my case, I have a large number of children, only some of which might get spawned at any given moment, and I'd like to keep them decoupled from the spawning machine (essentially, I have an interface that all the children adhere to, and I want to be able to add a new implementation and not have to update several places in code).

I could also see the benefit of loading and running machines from a remote store, where there's no knowledge at compile time of the types involved.

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