-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Proposal: return Promises as well as taking callbacks. #88
Closed
cscott opened this issue
Dec 5, 2014
· 1 comment
· May be fixed by solebox/node#25, UbuntuEvangelist/node#17, saeedahassan/node#35, erdun/node#41 or enterstudio/node#24
Closed
Proposal: return Promises as well as taking callbacks. #88
cscott opened this issue
Dec 5, 2014
· 1 comment
· May be fixed by solebox/node#25, UbuntuEvangelist/node#17, saeedahassan/node#35, erdun/node#41 or enterstudio/node#24
Comments
Closed
Closing as a duplicate of #11 |
This was referenced Mar 17, 2020
This was referenced Sep 15, 2021
This was referenced Nov 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a proposal for gradually moving node.js toward the ES6 future: all async methods in the node standard library which currently take a callback and return no value would instead be extended to return a
Promise
which can be used instead of the callback. (The callback would become optional, if it is not already. If you are really worried about performance for legacy code, you can return thePromise
only if no callback is supplied by the caller.)This would eliminate the need for extensive
promisify
calls in code using ES6Promise
s (or ES7 async functions), and provide an API like that enabled by thenodify
functions inbluebird
andprfun
.The text was updated successfully, but these errors were encountered: