TypeScript Version: 2.5.0-dev.20170618
Code
function fail1() {
throw new Error()
}
const fail2 = function () {
throw new Error()
}
Expected behavior:
Inferred return type of both functions is never
Actual behavior:
Only the return type of the second function is never. The return type of fail1 is inferred as void.