-
Notifications
You must be signed in to change notification settings - Fork 106
await* [asyncOp(), asyncOp()] -> await Promise.all([asyncOp(), asyncOp()]) ? #61
Comments
It doesn't seem useful to me. If it did something similar to yield* where it saves you from having to write complex loops to get an array of promises I would be OK with it but we just don't need sugar for typing |
My point - |
And it definitely wouldn't use Babel is just not implementing the spec here. |
FWIW, there is no reason await * can't stand on its own. There is committee consensus behind this proposal without await * so at this point if people want await * they can champion it as part of a separate proposal. |
Another point to not do await* now is that we might want to save it for something better. |
As @domenic said:
That's all I wanted to know. Thanks! :) |
Is there anything besides await [one, two, three] // async Promise.all([one, two, three])
await* [one, two, three] // async Promise.race([one, two, three]) |
@trusktr it'd be There's virtually no value in providing a syntax shortcut for |
I'm just wondering why it is not included in the proposal. It is already implemented in Babel.
The text was updated successfully, but these errors were encountered: