I have a few promise functions that I would like to do a promise.all on with async await. However i'm not sure how to do it when there is a 'then' chain in one of them.
For example.
Promise.all([
promiseFn1(),
promiseFn2().then(promiseFn3)
])
How would I implement async await when promiseFn2()
is chained inside a Promise.all
?
I'm thinking of making an annoynmous function but would prefer not to:
await Promise.all([
promise1.fn(),
(() =>{
p2response = await promise2Fn();
return promise3Fn(p2response);
})()
])