Correct. I generally find having more than one clause in else
an anti-pattern. We either use it as a “catch-all”, otherwise I prefer to have each function in with
already return the proper types, as shown in your last example.
2 Likes