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] Have functions return a promise #5

Open
patrickml opened this issue Jul 26, 2017 · 0 comments
Open

[Request] Have functions return a promise #5

patrickml opened this issue Jul 26, 2017 · 0 comments

Comments

@patrickml
Copy link

patrickml commented Jul 26, 2017

Since the server class is already wrapping the socket.io functions would it be possible to return a promise to keep true to the async await style. Especially since:

an Async Function always returns a Promise. That promise is rejected in the case of uncaught
exceptions, and it’s otherwise resolved to the return value of the async function.
This enables us to invoke an async function and mix that with regular promise-based continuation
as well.

https://ponyfoo.com/articles/understanding-javascript-async-await

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