7

Upgrading from angularjs.TypeScript.DefinitelyTyped 2.1.6 to 3.1.2 removed accessibility of the static angular variable I was using for module declaration files.

The following now gets an error that the symbol angular cannot be properly resolved.

angular
    .module("someModule")....

Resharper provides an option to import the variable from an external module, but this does not work.

Was the exposure of a global angular variable in earlier versions an error? Was it not intended to be used in the way my project has used it?

2 Answers 2

13

It's a bug with Resharper 9.0. The fix is scheduled for the 9.1 release. You can do one of two things to remedy it now:

  1. Disable Resharper by going to Tools->Options->Resharper-> Suspend. Note that you'll lose all Resharper features and you'll probably want to re-enable VS's Intellisense.
  2. Get the latest 9.1 EAP release if you're comfortable to pre-release versions.
3
  • 1
    Thanks! Tools->Options->Resharper-> Suspend also works and you don't have to restart VS. Now time to post an issue with JetBrains :). Commented Jan 23, 2015 at 15:27
  • 1
    youtrack.jetbrains.com/issue/RSRP-431238 Bug issue opened. Vote it up if this impacts you. Commented Jan 23, 2015 at 16:06
  • 3
    To turn off resharper inspections just for typescript: Resharper->Options->Code Inspection->Settings->Skipped elements->File masks to skip: *.ts. Commented Mar 28, 2015 at 12:14
2

I still see it in there. I suppose it's because the new version of the file uses syntax that is new to TypeScript 1.4. Either upgrade your compiler or downgrade to an earlier version of the .d.ts file.

1
  • It was Resharper in my situation.Disabling it and it behaves as you are reporting. Commented Jan 23, 2015 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.