Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper TypeScript seems to be not working at all in my VS 2015 installation

ReSharper TypeScript seems to be not working at all in my VS 2015 installation. Despite of the correctly placed TypeScript definitions ReSharper does not recognize the defined types, gives zillion red underlines, and of course intellisense does not work on the variables.

The error message is for example: Could not find symbol 'JQuery'

Some more diagnostics:

  • Compiling the project in VS 2015 compiles with no error. Making an intentional error in the source then build generates one correct error message
  • Intentionally making a spell in the type definition file paths, it underlined with red correctly. When correcting the path, underline diasppears
  • Opening the very same project in VS 2013 all works like a charm, ReSharper is working correctly
  • Originally used ReSharper 9.1.2 this issue was there. Now upgraded to the latest 9.1.3 and the issue remained.

Any ideas?

enter image description here

like image 887
g.pickardou Avatar asked Aug 06 '15 15:08

g.pickardou


People also ask

How do I know if ReSharper is enabled?

Possible reason: Check if there is "ReSharper" tab in the "Tools | Options" dialog, and ReSharper is not suspended. If there's no such dialog or it shows an error, continue to the next Part II of this guide (below). If ReSharper is shown as 'Suspended' in this dialog, use the "Resume" button.

How do I enable ReSharper?

In the Visual Studio menu, choose ReSharper | Options. In the Options dialog that appears, select a node in the left pane and configure settings in the right pane.

Does ReSharper work with JavaScript?

ReSharper fully supports JavaScript up to ECMAScript 2016, including experimental features such as async/await, exponentiation operator and rest/spread in object literals/destructuring. jQuery and JSX syntax are supported as well.


2 Answers

If you see this kind of behaviour - lots of red, but clean compile, especially after an upgrade - you should try to clean the caches. Go to ReSharper → Options → General → Clean caches, then restart Visual Studio.

like image 77
citizenmatt Avatar answered Oct 13 '22 15:10

citizenmatt


Since the problem occurs in more than one version including latest as of writing, you also have the option to switch off TypeScript support in ReSharper. After all, if a feature is broken, why use it?

How to switch it off according to their web site:

If necessary, you can disable/enable ReSharper features in TypeScript files by clearing the corresponding check box on the Environment | Products & Feature page of ReSharper options.

Source: JetBrains help page for ReSharper (retrieved 29 March 2018)

After this change you may have to restart Visual Studio for the new settings to take effect.

like image 24
Manfred Avatar answered Oct 13 '22 15:10

Manfred