In Marko, how can one <await>
multiple promises in parallel?
For example, I am looking for something like this:
<await(promise1, promise2)>
<@then|result1, result2|>
promise1 and promise2 are resolved in parallel
${result1} renders whenever it is ready.
${result2} renders whenever it is ready.
</@then>
</await>
You can use
Promise.all
to accomplish this.This would run the
@then
block once all of the promises have finished.