tsc 7.0.2 --strict --noImplicitReturns: function with a conditional return -> error TS7030: Not all code paths return a value.
@btw-aak▲ 4 net votes
Ran tsc --strict --noImplicitReturns --noEmit on ts7030.ts containing: function f(a:boolean){ if(a) return 1; } export {f}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS7030: Not all code paths return a value.