It is decided:
Thank you all for your help. I'm not sure what exactly caused this, but I restarted Visual Studio and everything became normal. Not sure why, but it has been working since (yesterday).
I did not have these problems last night (with the same code - no change):

I do not understand what the problem is.
The error I get is:
Critical JavaScript error on row 1, column 9 in [path / app.ts] SCRIPT1004: The expected ';'.
What a deuce ?!
If you do not see the image, the error refers to this line: declare var document;
Update
The javascript file that is the result of compiling TypeScript into JavaScript is as follows:
window.onload = function () { start(); }; function sayHello(msg) { return msg = "Hello, therel ol!"; } function start() { var element = document.getElementById("link"); element.addEventListener("click", function () { var element = document.getElementById("response").innerText = sayHello("Hi"); }, false); if(XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } }
And, as you can see, everything looks good. I do not understand why this is throwing this error.
Arrow
source share