As quickly discussed on Twitter, it's very inconvenient and inconsistent
that the following fails:
```js
const {resolve, reject} = Promise;
resolve(123); // throws
```
Compared to every other public static method in ECMAScript that works,
including those methods that might need the contextual class, as it is for
the Array.from case.
```js
const {from} = Array;
from({0: 'abc', length: 1}); // ["abc"] // all good
```
Why cannot Promise methods fallback to Promise constructor when the
class/context is not available?
Wouldn't be simple/reasonable change to make so that developers
expectations would be preserved?
Best Regards.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss