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
I would say this works as intended. The function foo declares that it will never return (by having never as the return-type). So the compiler correctly assumes that any code that comes after calling this method won't ever run.
TypeScript Version: 3.7-beta, 3.7.1-rc, Nightly
Search Terms: declare never unreachable 7027
Code
Expected behavior: no errors
Actual behavior: received error: "Unreachable code detected.(7027)"
Playground Link: https://www.typescriptlang.org/play/index.html?ts=3.8.0-dev.20191101#code/PTAEDMFcDsGMBcCWB7aFnIBQEpQG8AoEUEkgJwFN5Iy0BGUAQwGdRoKA3CsosAXwIEAJhVgAbRpQgwEKNOAw4AXG07dBUOElSgARpJz4CpdFmyCTlarVB0CAgkA
Related Issues: -
The text was updated successfully, but these errors were encountered: