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
<[email protected]> 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
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss



-- 
Atenciosamente,

Augusto Borges de Moura
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to