-
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
Make Promise requireable #1129
Comments
I thought `Promise' was introduced in ES6, as a global field just like String, RegExp, Date, etc |
|
Seems to go against #157 which was merged. The same sentiment also applies for all es6 globals (Promise, Symbol, Map, Set, WeakMap, WeakSet, Proxy, Reflect) and I guess also things like 'Date' and 'Math'. Can we at least be consistent with the way globals are handled? |
@Willyham The difference is that |
In hindsight, we should be able to get this via https://www.npmjs.com/package/globals
|
I don't really understand the usecase of this. Are you also keen on requiring other built-ins String, Number, Math, etc? |
Like issue #157, make Promise requirable. It's not a reserved ES6 keyword, so it would be nice to be able to not have to use it as a global (just like you can require('process'), require('buffer'), require('timers') and require('console').
(cc: @lxe @Raynos)
The text was updated successfully, but these errors were encountered: