Promise.resolve

Logan Smyth loganfsmyth at gmail.com
Sat Feb 2 21:19:55 UTC 2019


`Promise` can be subclassed, so the `this` context for `resolve` affects
what class is instantiated.

On Sat, Feb 2, 2019 at 12:25 PM Sultan <thysultan at gmail.com> wrote:

> Was there any reason Promise.resolve was not afforded the ability to
> dispatch outside of `this` pointing to the `Promise` constructor?
>
> For example:
>
> const {resolve} = Promise
> resolve(1234)
>
> This currently throws.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190202/67547e49/attachment.html>


More information about the es-discuss mailing list