Comment by DylanSp
2 years ago
Yep, or if you declare an explicit return type for the function, TS correctly gives a "Function lacks ending return statement and return type does not include 'undefined'." error. But if you have a function that's purely side-effecting, I think you still have to do something manual.
No comments yet
Contribute on Hacker News ↗