News for hackers. Stuff that matters.
Re:TypeScript 3.7 by saurik on Wednesday November 06, 2019 @02:54AM (#21460543)
I don't think this is correct, as the try catch will only catch errors that happen while returning the promise, not awaiting it; you need to do this:

    const result = await (async () => {
      try {
        return await funcThatReturnSomeType();
      } catch (err) {
        doSomethingWithErr(err);
      }
    })();
Re:TypeScript 3.7 by yawaramin on Thursday November 07, 2019 @07:29PM (#21478977)
You may be right, proving the old adage that the best way to get an answer on the internet is to post a wrong answer ;-)