melody icon indicating copy to clipboard operation
melody copied to clipboard

Missing IntelliSense on VS Code.. Add Type Definitions and JS Doc

Open Lusito opened this issue 7 years ago • 2 comments
trafficstars

IntelliSense for melody is really hard to read in Visual Studio Code. VS Code generates this from JS Doc or Type Definition files.

Sadly, there are only very few places in melody that have JS Doc comments. For some reason, a lot of functions have a license header instead of actual documentation. Why do you write license header for every function instead of just once per file?

Those few parts that have JS Doc don't seem to show in IntelliSense either.. I guess VS Code can't make it work for node-modules. But Type Definition files do work and they even work for JavaScript, so your users don't need to use TypeScript to benefit from this.

A website with tutorials is of course a nice starting point, but when I code, I usually use IntelliSense instead of visiting a website.

Lusito avatar Nov 24 '17 12:11 Lusito

For some reason, a lot of functions have a license header instead of actual documentation.

I'm guessing that VS Code picks it up from the rollup build (i.e. all source files merged into a single one). So we'll need to adjust the rollup config to strip the license headers and to add a single one per result file.

As for TypeScript: We've started to migrate the code to be written in TypeScript but its not high on our priorities list at the moment.

pago avatar Nov 24 '17 17:11 pago

Just for clarification.. I'm not asking for the code to be migrated.. I'm asking for a .d.ts file which only defines the types and functions.

Lusito avatar Nov 24 '17 17:11 Lusito