When editing .ts files in VS 2012 Update 3 with TS 0.9.1.0, the following lines of invalid typescript appears to be valid in the TS editor:
To repro this problem type a line of invalid JS like "x = 10 + L" and when the intellisense popup appears after pressing "L", wait for a few seconds (the red squiggly marks disappear) then press ESC to dismiss the intellisense popup. Now,
the line will appear valid. If you save the file at this point, invalid JS gets compiled and output.
Sometimes tinkering with the code and/or interacting with the editor fixes the issue, displaying the expected error highlighting but the JS that is compiled when you save is still invalid:
This seems to happen a lot with a large TS project. I don't understand why TS is allowing invalid JS to be output. In the past when I used Web Essentials to compile the TS it would simply display a list of errors that needed to be corrected instead of invalid
This problem makes it impossible to trust the error highlighting in the VS 2012 Plug-In with TS 0.9.1 and that the TS compiler is generating valid JS. This is a major pain point.
I have Web Essentials installed but I have turned off its compile on save and preview window features in an attempt to just use the TS Plug-In's built-in capabilities.