Awaiting block expression

Augusto Moura augusto.borgesm at gmail.com
Fri Jun 21 13:40:56 UTC 2019


The do expressions proposal[1] had some discussions about having a
`async` variant[2] you should give it a look
Is the same concept you are proposing

[1]: https://github.com/tc39/proposal-do-expressions
[2]: https://github.com/tc39/proposal-do-expressions/issues/4

Em sex, 21 de jun de 2019 às 03:42, Tobias Buschor
<tobias.buschor at shwups.ch> escreveu:
>
> As there are more and more async apis, i would like to have a block, where all promises within automaticly are awaited:
>
> Proposal:
>
> const image = await {
>     const user = fetch('/user/'+id).json();
>     fetch('/image/'+user.image).json();
> }
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



-- 
Atenciosamente,

Augusto Borges de Moura


More information about the es-discuss mailing list