Programming in JavaScript with documentation in the IDE - javascript

i recently got shown the Phaser framework (found at phaser.io) and plan on using javascript with it. I'm very used to coding in java in eclipse which has code assist that lets you see the documentation of a method (parameters, description etc) and i want to know if there is a way to/how to do it with javascript. The framework comes with the documentation, but how can i link it to the class in an ide?

Check out TypeScript and Phaser.io. This will give you full intellisense (auto-complete) in Visual Studio. This is exactly what you desire and the workflow works well as I have been using it for over 6 months.

Related

Visual studio code popup documentation API

Hi I am trying gather a list of all my Javascript functions in my project together with the comments for each function. Visual studio code provides a beautiful way of viewing each function with a popup, but I have no idea how it works and where to start my research. Anyone know an API I could use or what I can do to get this data?
Based on the provided print screen, as it presents the Quick Fix... at the Botton, I would say you are looking for the CodeActionProvider API.
The VS Code team provides a repo full of samples at https://github.com/microsoft/vscode-extension-samples, and this API in particular is at https://github.com/microsoft/vscode-extension-samples/tree/main/code-actions-sample.
The VS Code website also provides a complete overview of language related features, at https://code.visualstudio.com/api/language-extensions/programmatic-language-features. You could take a closer look and decide which one better fit your needs.
Hope this helps

Javascript documentation is vague in VS Code, is there a plugin to show more?

Excuse my naïvety, but I find Flutter/Dart documentation very intuitive and easy to use in VS Code. Same goes for Android Studio when I was using it. Now using VS Code for javascript and Parse Cloud code there is almost zero documentation. Am I doing something wrong or is there a plugin for javascript to get more data? Same goes for Atom which I was using initially and gave absolutely zero documentation for javascript even with some autocomplete plugins.
This makes it extremely difficult to learn the APIs. Is there a plugin for javascript that I'm unaware of?
Flutter package documentation on hover:
Flutter autocomplete (also shows more data about method if available):
Javascript & Parse Cloud Code documentation- ZERO DATA:

Do I need to know Typescript to learn Angular 2?

Some time ago I decided to learn Angular. I didn't know JavaScript any well, so I spent several months to learn it (I am not an expert or anything, but I am able to create some simple applications now). Now that I thought I am ready to Angular (the 2nd version of which became available), I opened the official website (https://angular.io/) and was stunned to see that their docs suggest that I need to know Typescript as well to write some code now. JS version of the docs is not yet ready and suggests you to go to the Typescript docs instead.
Is Angular 2 available for the Javascript only? If so, are there any official docs on it?
No. TypeScript is not required to use Angular 2. It's not even the default. That said, TypeScript would benefit you to learn if your job was exclusively calling for front-end development specifically with Angular 2.0.
Even the official 5 Min Quickstart article starts off with plain ol' JavaScript.
All of their code samples and tutorials will eventually be available in JavaScript. Their wording simply says it's "not yet available in JavaScript".

Javascript code editor with intelligence

Is there any code editor or even IDE, where you can get some compassion in the form of "method" auto-complete suggestions and "jump to definition", for your javascript code that uses a library like d3.js?
I have found that WebStorm does all that.
Need to follow here to set it up to know your external library (e.g. d3.js in my case) so that it can be smart about it. Download the unminified/debug version of your library first so you can supply it in that dialog. Installing WebStorm was quick and a no-brainer.
If you know of other tools that have these capabilities, please post your answer as well...
WebStorm currently doesn't cost all that much and currently comes with a 30 days trial.

How to convert javascript to dart using frog?

Someone on this site mentioned that it was possible to use frog to convert javascript to dart. I gave it a try but was unsuccessful.
what is the detailed procedure to convert javascript to dart with frog?
thanks
Florian Loitsch (from the Google Dart team) created a JavaScript to Dart parser at the recent London Dart Hackathon.
Code:
http://code.google.com/p/jsparser/
Announcement (quoted below):
https://groups.google.com/a/dartlang.org/group/misc/browse_frm/thread/4d7af7aec81f2ac4#
I spend a little bit of time during this weekend to make it more complete
and usable, but don't expect a polished product. For example there are no
tests, yet.
That said: I do think that the library is in a usable state. I also tried
to keep the code simple (even if that sometimes meant sacrificing some
speed), and I hope that this alone makes the library valuable.
My motivation for the parser was to help in (semi) automatic translations
from JavaScript to Dart. Currently I don't have the time to continue on
this path, but maybe somebody else wants to give it a try?
-Florian Loitsch
Update: turns out Florian from the Google Dart team made a proof of concept of a JavaScript-to-Dart converter.
This is not possible. What is (or soon will be) possible is for the Dart JavaScript compiler to self host, meaning that you could compile the compiler to JavaScript, embed it into a web page and compile Dart dynamically to JavaScript on the fly. This will also make the DartBoard much more interactive, unlike the current edition which executes your Dart code server side.
Just thought I'd mention that [Google themselves released an official JavaScript-to-Dart app/library known as 'dart-synonym'. The AppEngine code and core JavaScript libraries are available on GitHub
Aaron Wheeler and Marcin Wichary from Google outline it in this blog post.

Categories

Resources