Promise() vs. new Promise()

Rick Waldron waldron.rick at gmail.com
Wed Aug 20 06:23:37 PDT 2014


On Wed, Aug 20, 2014 at 8:52 AM, Axel Rauschmayer <axel at rauschma.de> wrote:

> Currently there seem to be two ways to create promises. Normal classes
> throw an exception if you call them as functions (without `new`). Should
> `Promise` do the same?
>

They already do:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise Steps 1-4.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140820/ba00da04/attachment.html>


More information about the es-discuss mailing list