Proposal: `await [p1, p2]` (equivalent to `await Promise.all([p1, p2])`)

Jordan Harband ljharb at gmail.com
Wed Oct 26 07:33:29 UTC 2016


Your suggestion would preclude having a promise for an array (exactly what
`Promise.all` returns).

If you want `await` syntax for `Promise.all`, you'd need different syntax
for it - and then, what about `Promise.race`? What about other future
combinators?

On Wed, Oct 26, 2016 at 12:25 AM, Olivier Lalonde <olalonde at gmail.com>
wrote:

> I don't think so, what do you mean?
>
> On Wed, Oct 26, 2016 at 12:22 AM, Raul-Sebastian Mihăilă <
> raul.mihaila at gmail.com> wrote:
>
>> Then Promise.resolve([p1, p2]) should be like Promise.all([p1, p2]) ?
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
>
>
> --
> - Oli
>
> Oli Lalonde
> http://www.syskall.com <-- connect with me!
>
> _______________________________________________
> 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/20161026/f6055bf0/attachment-0001.html>


More information about the es-discuss mailing list