Re:TypeScript Is Surprisingly OK for Compilers
by lovasoa on Friday August 18, 2023 @03:46AM
(#37172478)
With async code, there is
[ Parent
| on HN ]
Re:TypeScript Is Surprisingly OK for Compilers
by WorldMaker on Friday August 18, 2023 @10:28AM
(#37176117)
That leaves c as Promise which was not the type they were looking for. You'd still have to unwrap the promise and deal with the result or rejection. The easiest way to do that is to use await, and if you are using await you'd be better off using try {} catch {} around the async function than .catch().