Hacker News new | past | comments | ask | show | jobs | submit login

The answer is to never throw exceptions from promise returning functions. Mark all promise returning functions `async` - even when it doesn't `await` - because an async function always returns.

https://typescript-eslint.io/rules/promise-function-async/




This only solves the second example (the "map" one), but not the first example because it doesn't contain any promise-returning function that throws.


> doesn't contain any promise-returning function that throws

Then what is the issue described in #1?

Ahh, the compute arg calls




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: