You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
thanks for the bug report. we're open to PRs here, but unreachable code detection is coming to the compiler in 1.8 and we're going to deprecate it in TSLint soon (#661), so it's low priority.
Thanks for the clarification! I was not aware of this particular quirk in TS/JS, since I'm used to writing return statements like this from other languages. It didn't even compile, so I had no chance to see the error in JS. ;)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This code validates fine:
while this does not (error "unreachable code" after the semicolon):
Additionally, the error is also caused by simply adding a line break after return.
The text was updated successfully, but these errors were encountered: