I'm sure that this is more complex than it looks like...
But it would be nice if it would detect easy cases like:
const myFunction = (x) => {
return (x>0) ? "ok" : "not ok"
}
being equivalent to
const myFunction = (x) => {
if(x>0){
return "ok"
} else {
throw "not ok"
}
}