Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Jasper_
on Nov 6, 2019
|
parent
|
context
|
favorite
| on:
TypeScript 3.7
They're not equivalent if doSomething might throw and you don't want to catch it.
brlewis
on Nov 6, 2019
[–]
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: