Last active
March 28, 2018 12:06
-
-
Save ThomasKruegl/ab41866fec613ffbe6c7f51f352fb4f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function throwing(): never { | |
throw new Error(); | |
} | |
function throwingAgain(condition: boolean): never { | |
if (condition) { | |
throw new Error(); | |
} else { | |
// solution: add return for this | |
throwing(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment