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

Promise.allSettled access to the fulfilled promise values #101

Open
dev-syn opened this issue Sep 17, 2024 · 1 comment
Open

Promise.allSettled access to the fulfilled promise values #101

dev-syn opened this issue Sep 17, 2024 · 1 comment

Comments

@dev-syn
Copy link

dev-syn commented Sep 17, 2024

Hello, could the Lua implementation allow access to the settled fulfilled promise values as you can in Javascript's Promise.allSettled?

I am using roblox-ts in my project and I'd like to access the values of my fulfilled promises while the work is done asynchronously, I noticed in this implementation there is only access to the status of the promise and nothing else.

For now, I will chain my promises within the working loop but it would be nice to store the promises in arrays and wait till they all settle rejected or not and for the ones that are fulfilled, I'd like to handle the values.

@dev-syn
Copy link
Author

dev-syn commented Sep 17, 2024

My chain in loop isn't even practical because I need to ensure all the promises from my batch are done before moving on to the next batch so for now I will write a custom allSettled function but it would be great to see it implemented officially if this is something you find reasonable

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