Hacker News new | ask | show | jobs
by koush 5381 days ago
This is certainly something that is doable and crossed my mind, but I did not want to have the await be restricted to functions that conform to the typical return arguments. For now at least.
1 comments

How about

  try await foo = bar(baz)
as shorthand for

  await error, foo = bar(baz)
  if (error) throw error