### π Search Terms location.reload location.href ### π Version & Regression Information - This is the behavior in every version I tried, and I reviewed the FAQ for entries about unreachable code ### β― Playground Link https://www.typescriptlang.org/play/?ssl=13&ssc=1&pln=1&pc=1#code/FAMwrgdgxgLglgewgAhAhAKAlMg3sZQ5AJwFMYxiIBuYAogQwBtTiYMByAC1KaYQ5ZaAXzrho8JMgBGDYtjz1CAdzgQAJgmUA6flAaSI2svwbrstJcmat23Xv0EjgQA ### π» Code ```ts function foo() { return; alert('hello'); } function bar() { window.location.reload(); alert('hello'); } ``` ### π Actual behavior line 5: Unreachable code detected. ### π Expected behavior line 5: Unreachable code detected. line 11: Unreachable code detected. ### Additional information about the issue The same applies to when when assigning location.href = ... for example