-
Notifications
You must be signed in to change notification settings - Fork 395
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
ES6 shim without global Promise #451
Comments
Hey @guybedford. There's no way yet, but we're planning to provide one. In the meantime, would it work for you to write your own tiny wrapper module that does the following? var unhandledRejection = require('when/lib/decorators/unhandledRejection');
module.exports = unhandledRejection(require('when/lib/Promise')); If so, then that'd get you an ES6 compliant If that's not an option, let me know, and I'll bump up the priority on this. |
Thanks @briancavalier for the quick response - yes that will work great. Note it is specifically for Node that this is needed - in the browser we do want the Promise global to be polyfilled. In terms of implementing the shim without overriding the global, what would be really useful is setting |
Cool, thanks for confirming.
Yep, I totally agree. That's the route we'll go. See #442 for a bit more on why we originally decided to forcibly overwrite global Promise. |
Is it cool w/you if we close this and track progress in #442? |
Sure, thanks for your help! |
Is it possible to require the es6-shim in a way that doesn't override the global Promise?
The text was updated successfully, but these errors were encountered: