Vignesh Subramanian
Vignesh Subramanian

Reputation: 7289

visual studio showing errors in typescript files but code works fine

I am starting to learn angular2

and I happened to clone the Angular 2 Quickstart from github

Now, what I noticed is that, some of the statements in typescript files are shown as errors in Visual Studio, but they actually work

enter image description here

I checked a similar question which was resolved by installing MVC4 in the machine.

What should I install/do to fix this?

Upvotes: 2

Views: 119

Answers (1)

Ilya Chernomordik
Ilya Chernomordik

Reputation: 30175

In my experience Visual Studio is a bit unstable with regards to this on-the-fly sync and compile. What helped me is just a simple restarting of Visual Studio (if all other stuff is in order).

If that does not help, it's better to update TypeScript to latest version. I do it first thing in Visual Studio. You cannot do it directly from extension tab unfortunately, so you need to download it from MS site.

P.S. The Url might change later of course if new versions are released.

Upvotes: 1

Related Questions