TypeScript IntelliSense does not work in VS2012

So, I have the typescript extension installed, and I see a new type of project ("HTML application with TypeScript" and ".ts"). Everything seems to work (compilation, error counting, etc.), but I can't get IntelliSense to work correctly. Hovering over a parameter displays its type, but code completion and list members do not work. It doesn't matter if I Strg + Space or select List Members from the menu, nothing happens.

I tried to disable / enable the "auto-list of participants" in the parameters, even reset all the parameters. IntelliSense works great in C # projects and even works great in the .js file that is generated.

+4
source share
6 answers

This is a small issue with Visual Studio. You need a leading "<" for this to work.

 WRONG way to add a .ts reference: /// reference path="myOtherFile.ts" /> RIGHT way: /// <reference path="myOtherFile.ts" /> 

VS 2012 crashes in WRONG text when you drag a file from the decision explorer tree to a text file. It is easy to fix, but it is difficult to notice the problem in the first place.

+4
source

I'm a little confused by this, but about 4 hours after uninstalling / reinstalling, rebooting, etc. I looked through the links and noticed something strange:

When I drag .d.ts (or any .ts file for this), I get the following:

 /// reference path="jquery.d.ts" /> 

This is not true. Note that this is an XML comment and needs to open the < tag. I changed this:

 /// <reference path="jquery.d.ts" /> 

And suddenly everything began to work perfectly.

+2
source

It is very strange. Can you post some examples of places where you expect the completion list to appear, but is it not?

Just a health check, you do not see any members after entering the point here?

 var n = 3; n. 

If this does not work, execute the error file in the CodePlex project.

+1
source

The problem with my problem was disabling Typescript Intellisense in Resharper. Watch this blog

+1
source

I had the same problem and after an internet search found this question on stackoverflow. But then my box crashed. I restarted my OS, and then IntelliSense started working. My answer was to restart the OS as well as VS2012.

0
source

This issue may be caused by the MySQL Visual Studio extension. Try removing it and see if there is a problem.

https://typescript.codeplex.com/workitem/24

0
source

Source: https://habr.com/ru/post/1437363/


All Articles