3 ms·
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 '
by DylanSp 2y 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.