0
votes

I'm new to developing with WebStorm and don't understand the difference between adding an original library with a global scope (e.g. jquery.js) either from the local file system or by downloading it via the Download button (from the Official libraries list) and adding a so-called TypeScript community stub for jquery (all via Settings... -> Languages & Frameworks -> JavaScript -> Libraries). Both give me code completion, but what is the difference and what is preferable?

And why TypeScript when we are dealing with JavaScript only?

1

1 Answers

0
votes

You can use either of them, there is no principal difference. Typescript stubs are definition files for popular javascript libraries and frameworks. Please see http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/ - you may find this blog post helpful