-
-
Save christiannwamba/1b775dd8bfe263baf72048e2e071b7b3 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 throwIt(message: string): never{ | |
throw new Error(message); | |
} | |
// Inferred return type is never | |
function fail() { | |
return error("Something failed"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment