Skip to content

Instantly share code, notes, and snippets.

@christiannwamba
Created May 29, 2018 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiannwamba/1b775dd8bfe263baf72048e2e071b7b3 to your computer and use it in GitHub Desktop.
Save christiannwamba/1b775dd8bfe263baf72048e2e071b7b3 to your computer and use it in GitHub Desktop.
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