by Scooty · 7y ago · 0 comments
Types make it easier to catch mistakes early in general. Typescript has a compiler rule 'no-hanging-promises' to help avoid forgetting to await.
So using Promise.all() would be as simple as:
const results = Promise.all(async fetch(url1), async fetch(url2))