Search code examples
javascriptreferencewebstormdefinitelytyped

How do I get WebStorm's JavaScript Library support using DefinitelyTyped interface definitions to work?


I'm trying to get WebStorm's JavaScript Library support using DefinitelyTyped TypeScript interface definitions to work as expected (hopefully as intended) in JavaScript.

I've added the library definitions using the Download feature...
Languages & Frameworks > JavaScript > Libraries
I made sure it's in the global scope, too.

Yet I can't seem to reference THREE or any of the other DefinitelyTyped library module definitions.
Unresolved variable or type 'THREE' ...
It's not just undefined inside of JSDoc references, it's undefined everywhere. I know I should have "@type" here instead of "@param", I was just trying to elicit a different result; the results are the same.

What am I doing wrong? Do I need to create a _references.js as one would for Visual Studio or something?


Solution

  • Restart WebStorm at least twice (possibly four times) after having added the interface definitions. 🤦

    enter image description here

    This solution applies to WebStorm 2016.2.1