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.
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks! Tools->Options->Resharper-> Suspend also works and you don't have to restart VS. Now time to post an issue with JetBrains :).
youtrack.jetbrains.com/issue/RSRP-431238 Bug issue opened. Vote it up if this impacts you.
To turn off resharper inspections just for typescript: Resharper->Options->Code Inspection->Settings->Skipped elements->File masks to skip: *.ts.
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 Comment

It was Resharper in my situation.Disabling it and it behaves as you are reporting.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.