Typescript 1.4: Wrong syntax highlighting in Visual Studio Typescript 1.4: Wrong syntax highlighting in Visual Studio typescript typescript

Typescript 1.4: Wrong syntax highlighting in Visual Studio


Rather than turning off Resharper, you could configure it to ignore analysing errors in *.ts files. (Tools -> Options -> Resharper Options -> Code Inspection -> Settings -> File Masks to Skip -> add *.ts)

This way you still benefit from using Resharper for other files, and you also get the benefits of code formatting and the like for TypeScript using Resharper.


I was having a similar issue where Resharper was not recognizing the "const" keyword.

I fixed this by explicitly telling Resharper what version of TypeScript to use. By default it is set to "auto detection".

On the menu, go to Resharper > Options > Code Editing > TypeScript.

Change the Type Script Language Level to "1.5 (experimental)"


I've had the same issue, and for me it was Resharper that was causing the problem.

If you have Resharper installed then simply disable it while working on TypeScript 1.4, at least until JetBrains releases an update with 1.4 support.

To disable Resharper:Tools -> Resharper -> General -> Suspend