question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Improve JSDocs

See original GitHub issue

TensorFlow.js version

"@tensorflow/tfjs-node": "^1.4.0" but it also happens with previous releases.

Describe the problem or feature request

Currently the declaration preview (hovering over a method) is not very informative. For example, hovering over dot method I get the following info image Same happens with auto complete feature: image

Because of this, I constantly have to check the API available at https://js.tensorflow.org/api/latest/ Which is completely fine but having docs directly in my editor would be much better.

I’ve looked at actual exports_layers.ts file and the description of the dot method is declared there. image

The problem is that the description is declared in a separate blocks. So vscode ignores the /** docs */ block and only shows the /** @doc {} */

/** docs */
/** @doc {heading: 'Layers', subheading: 'Merge', namespace: 'layers'} */
export declare function dot(args: DotLayerArgs): Layer;

Merging two blocks into one

/** docs 
  *   @doc {heading: 'Layers', subheading: 'Merge', namespace: 'layers'} */
export declare function dot(args: DotLayerArgs): Layer;

creates a much better experience as I have all the info directly in my code editor image

Is this something that you can do?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
archie-swifcommented, Aug 12, 2020
0reactions
tafsiricommented, Sep 10, 2020

this will be available in the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating better JSDoc documentation | The Startup - Medium
A detailed article, with examples, on how to create advanced, readable, and reusable JSDoc documentation for your Node.js projects.
Read more >
JSDoc Reference - TypeScript: Documentation
JSDoc Reference. The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files.
Read more >
JSDoc comments | WebStorm Documentation - JetBrains
WebStorm recognizes JSDoc comments and helps you create them by automatically inserting @param , @returns , @private , and other tags when ...
Read more >
How to document a Require.js (AMD) Modul with jsdoc 3 or ...
This is my first answer on SO, please let me know how I can improve future answers. Your specific example. I've been searching...
Read more >
Documentation Comments in JSDoc - GeeksforGeeks
For Constructor, JSDoc comment similar to Function is used; Inside the Constructor, to document variables, the @property tag is used. Linking ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found