How to get decent documentation on javascript functions?

Because this isn't that helpful:

 

Specially when more "simple editors" get you the real deal:

 

I went to the documentation source of that not-documented function (as all other functions I tried to get info on) and Webstorm sent me to an Ecmascript.js file (/Volumes/JetDrive/WebStorm.app/Contents/PlugIns/JavaScriptLanguage/lib/JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/EcmaScript.js). Should I somehow replace it with a documented JS file or... ?

 

14
17 comments

Quick documentation popup opened on F1 (or Ctrl+Q) shows information written in comments attached to object in .js file object is defined in (EcmaScript.js in your case). You can create a copy of this file somewhere on your disk, add more doc comments to functions stubs, and add this modified file as a Javascript library to your project

If you like to see full API docs, hit Shift+F1, or press blue 'up' arrow button in documentation popup toolbar (note that this function is only available for libraries that have 'documentation URL' configured)
See https://www.jetbrains.com/help/webstorm/2016.2/viewing-inline-documentation.html

 

0
Avatar
Permanently deleted user

But this doesn't make any sense. You are saying that out of the box there's no information on javascript functions on a javascript IDE

Sigh... Anyhow, I looked for like an hour, in google, github etc. I couldn't find any "EcmaScript.js" or whatever that contained the javascript code well documented so that Webstorm/Phpstorm can display what "push()" does.

So how can I have a paid Javascript IDE with Javascript information?

9

EcmaScript.js can't be downloaded, it's a file with JavaScript stubs for standard API functions created specially for WebStorm to provide completion, etc. You can open JavaScriptLanguage.jar!/com/intellij/lang/javascript/index/predefined/EcmaScript.js in text editor, copy its content and paste it into your own .js file, and then edit it, adding/modifying JSDoc comments for functions

0
Avatar
Permanently deleted user

I think I'm being very clear on my point. I still not understand how a JAVASCRIPT IDE doesn't provide information on JAVASCRIPT language. I want to know what reason could it be for emacs, vim, sublime and atom (that I know of, so there are more) to provide JSDocs and Webstorm and Phpstorm not to do it.

There has to be another solution than manually editing EcmaScript's JSDocs.

9

Create a feature request for adding more docs in youtrack then

-9
Avatar
Permanently deleted user

Seriously?

5
Avatar
Permanently deleted user

"Smartest Javascript IDE"

https://github.com/Microsoft/TypeScript/blob/master/lib/lib.es6.d.ts

but ofc I can't add that because only definitelytyped works

3
Avatar
Permanently deleted user

Wow, disappointing!

4
Avatar
Permanently deleted user

 

Could any developer spare a few seconds to explain what the hell is going on with this, please?

4
Avatar
Permanently deleted user

This issue is already tracked in youtrack: https://youtrack.jetbrains.com/issue/WEB-12145 

Vote for it!

2
Avatar
Permanently deleted user

Listen I'm ecstatic that after people pay for a javascript IDE, they can vote for years (since 2014) so that said javascript IDE can show javascript function documentation.

While we wait for years, for you to implement something very very easy and very useful, I'd like for someone from JetBrains to explain to us the logic behind this nonsense. You could have a properly documented *.js file for autocompletion and documentation, yet you are using an empty one, with only arguments if lucky.

Why? The information is already public; it's not like you have to type it manually. All other IDEs/editors have it.

JetBrains products are good, but this one thing I don't understand.

Please explain.

8
Avatar
Permanently deleted user

I reluctantly agree with the OP here (though the aggressive tone is freaky: we're talking the relative trivia of dev tools here, not climate collapse). 

I've mostly used IntelliJ platform IDEs with relatively strongly-typed languages (Objective-C, Swift, Java, Kotlin). IntelliJ is glorious here, particularly the refactoring -- it really comes close to feeling like interacting with a syntax tree rather than text.

Of course these are much easier to build tooling around. But doing some javascript recently I'm surprised at just how poor the experience is in Webstorm/IDEA. Everything needs configuring; the documentation seems sparse and frequently outdated. Getting things working smoothly seems like a lot of work in a haze of confusion.

If I mainly worked in javascript, I wouldn't consider IntelliJ worth paying for.

4
Avatar
Permanently deleted user

This is kind of disappointing, I went from VSCode to RubyMine mainly due to lack of Ruby documentation support for methods by Code or its plugins. But now I get pretty much the same thing here, no JS documentation on RubyMine while Code a "simple text editor" includes it by default.

Seeing that this issue has been reported on since 2014, I don't have much hope on it getting fixed anytime soon, hopefully I'm proven wrong.

2
Avatar
Permanently deleted user

I've been pushing this issue everywhere. Nobody from JetBrains has contacted back but I gave up waiting. It' been a year.

 

JetBrains products are good, I like them, and they've been second nature to me for years. But my projects can't wait for real JS support. I've moved to VS CODE, surprisingly they are even improving they already awesome support for code recognition, files, and whatnot.Plus, you can beef it up with plugins made with... javascript! Now I can start

Plus, you can beef it up with plugins made with... javascript! And not awkward java like JetBrains. And so far the API is great.

 

I swear, I'm not a VS CODE fanboy by any stretch, but every month they clear hundreds of issues and push thousands of commits.

And most importantly, they get back at you in a heart beat. And the whole thing is free! I paid for my JetBrains products good money and got silence in return.

4
Avatar
Permanently deleted user

This is really disappointing. Having javascript documentation in a javascript IDE is fundamental. How can this not be done already? 

1

 

I have to agree with Neithan here. This is a paid software and you guys should be able to listen to its users and give us far better responses than "Create an issue and vote" 

0
Avatar
Permanently deleted user

This issue is fixed in EAP 2017.3. Works for me.

I have been a huge fan and heavy user of Jetbrains over the years. It is mind-blowing to me that this fundamental issue took 3 years to address.

1

Please sign in to leave a comment.