Questions tagged [jsdoc3]

JSDoc3 is an API documentation generator for JavaScript. It can be customised via a plugin mechanism and the output can be controlled via templates. It is written in Javascript and can be run with Node.js or Rhino.

JSDoc 3

JSDoc3 is an API documentation generator for JavaScript. It can be customised via a plugin mechanism and the output can be controlled via templates.

It is written in Javascript and can be run with Node.js or Rhino.

The tool can be found at https://github.com/jsdoc3/jsdoc

The documentation can be found at http://usejsdoc.org/

279 questions
9
votes
2 answers

Describing an array of objects in JSDoc

I've got a function which takes an array of objects. Looks like this. myAwesomeFunction([ { name: 'someName', next: false, test: 'test' }, { name: 'nameTwo', next: true } ]); So far my JSDoc…
Per Pettersen
  • 101
  • 1
  • 3
9
votes
1 answer

AMD + Backbone + JSDoc3 best way to document

I'm looking for the best way to document my code, but I don't find anything. I've see others topics, including this, but there all doesn't resolve my problem. I have something like this: define([ 'backbone' ], function (Backbone) { /** …
Exos
  • 3,610
  • 1
  • 19
  • 28
8
votes
3 answers

Grouping Functions In JSDoc Generated Documentation

I'm using documentationjs (which uses jsdoc under the hood) to handle the generation of docs for a lib I'm working on. My lib is written is ES6 and is fully functional, and at present the documentation generated is an alphabetical list of all the…
Undistraction
  • 38,727
  • 46
  • 165
  • 296
8
votes
2 answers

Javascript + JsDoc: How to document new ES6 datatypes like map?

I'm trying to use JSDoc in my ES6 project, I'm returning a Map: /** * Some documentation.. * * @returns {undefined} <- This should be replaced */ function returningMap() { const someMap = new Map(); someMap.set("key", {a, b, c}); …
Shikloshi
  • 3,451
  • 6
  • 24
  • 54
8
votes
1 answer

JSDoc: What is a relationship between modules and namespaces

I faced a problem with understanding the purpose of namespaces and modules in a union. For example I have a class Game.utils.Matrix. I want to annotate Game as a namespace, utils as a module and Matrix as a class: /** * @namespace Game */ /** *…
aspirisen
  • 775
  • 9
  • 27
8
votes
1 answer

Jsdoc3 commenting object

Assuming I have some object, what the is way to comment it using jsdoc3? /** * Test object * @namespace test */ var test = { /** * Some defaults * @memberOf test */ defaults: { 'test1': 1, 'test2': 2 }, …
Max
  • 941
  • 9
  • 21
7
votes
1 answer

jsdoc - Reuse docs for multiple functions?

I have a function with a huge list of options: /** * Show dialog in a blocking manner. * * @param {object} opts * @param {string} opts.msg "Body" of the dialog. * @param {number} opts.timeout Seconds - floating point values are rounded.…
AndyO
  • 1,067
  • 16
  • 23
7
votes
1 answer

jsdoc with node generates empty index.html

I used the following command to generate html from the javascript file. $> jsdoc --debug jquery.js $> open out/index.html Output of the command DEBUG: JSDoc 3.3.2 (Sat, 13 Jun 2015 22:20:28 GMT) DEBUG: Environment info:…
JKdevp
  • 71
  • 4
6
votes
2 answers

React Hooks - JSDoc with destructured array variables

I'm trying to JSDoc a simple React Typescript component with hooks. Unfortunately, I can't seem to find a way that makes JSDoc work with declared destructured arrays. There are some answers related to destructuring object params, but these don't…
shinglesmingles
  • 335
  • 4
  • 12
6
votes
1 answer

JSDoc is this how you mark a @typedef as @global?

Just making sure that this in a module in our Node server is the right way to be able to use an @typedef throughout the application instead of repeating it in every module/file it is needed. From the docs I can't determine if this is correct or…
mtpultz
  • 13,197
  • 18
  • 96
  • 180
6
votes
3 answers

static class property not working with Babel

I am using JSDOC and all it supported npm plugins to create nice documentation. Getting hard time when jsdoc is running and parsing JSX file it always throws error as below near = sign SyntaxError: unknown: Unexpected token export default class…
Keysinnovation
  • 125
  • 1
  • 9
6
votes
3 answers

jsdoc: multiline description @property

I am documenting my code using jsdoc, so far so good, I have a comment like below ... * @property {string} mode - mode of display 'video' - display video or 'audio' - play only the audio. * @property... and it comes in html document like | ... …
mido
  • 20,728
  • 10
  • 84
  • 109
6
votes
1 answer

Autocomplete for my functions in the google-apps-script editor

Can I get in editor autocomplete for my functions using JSDoc somehow? I am creating a big google spreadsheet with a lot of code in the associated script editor. I get autocompletion help when I write the period on LINE 1 (see code below), but not…
consideRatio
  • 981
  • 10
  • 18
6
votes
3 answers

JSDoc object methods with @method or @property?

JSDoc 3's documentation includes this example: /** * The complete Triforce, or one or more components of the Triforce. * @typedef {Object} WishGranter~Triforce * @property {boolean} hasCourage - Indicates whether the Courage component is…
djechlin
  • 54,898
  • 29
  • 144
  • 264
5
votes
0 answers

jsdoc comments for npm module not appearing in vscode

I have an issue with npm and jsdoc. This question is similar to, but not the same as: How do I get my npm module's JSdoc documentation for functions to show up in users' VScode? In my case, the jsdoc info will appear if install the code in a local…
Bob Dill
  • 938
  • 4
  • 12
1 2
3
18 19