Re:TypeScript 3.7
by brlewis on Tuesday November 05, 2019 @10:01PM
(#21459365)
Another commenter pointed out that .catch is perfectly fine in the async/await world, even though you pretty much never use .then anymore. Here's another way of doing it:
[ Parent
| on HN ]
They're not equivalent if doSomething might throw and you don't want to catch it.
Right, which goes back to the question shtylman asked about why doSomething couldn't be part of the try block. I'm tossing this form out there in case it helps. People sometimes forget that await can go wherever an expression goes.