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/

294 questions
20
votes
2 answers

How can I omit the source links in JsDoc?

What's the easiest way to cause JsDoc to leave out the source links? Do I have to define my own template?
jwl
  • 10,268
  • 14
  • 53
  • 91
19
votes
1 answer

jsdoc proper way to document socket.on('event', function() {}) and routes handler

How to document API using jsdoc which has following form (single file) // api.js exports.addSocketEvents = function(socket) { /** * This will do that and ... * @param {Object} data Some data * @param {string} data.bla Something about…
Srle
  • 10,366
  • 8
  • 34
  • 63
19
votes
2 answers

jsdoc two dimensional array

I have an array of array of string and I can't figure out how to document that with JSDoc. /** @class */ function PostbackList() { /** @type {int} @default */ this.TypeID = 0; /** @type {PostbackList.Field[]} */ …
Serge Profafilecebook
  • 1,165
  • 1
  • 14
  • 32
16
votes
6 answers

jsdoc : reference typedef-ed type from other module

Assuming I have a typedef type in a js module // somewhere/foo.js /** * @module */ /** * @typedef Foo * @type {object} * property {string} bar - some property */ Is it possible to reference this type in another module, so that in the HTML…
phtrivier
  • 13,047
  • 6
  • 48
  • 79
16
votes
2 answers

Using JsDoc3 for large apps, How to group modules into sections/categories/submodules

I am working on an app which will become quite huge in time. I have decided to use JsDoc3 and DocStrap to document all modules. Modules are defined via require.js and in some places they are nested up to 3 or 4 levels deep. Until now I understand…
Adrian Moisa
  • 3,923
  • 7
  • 41
  • 66
16
votes
1 answer

Generate JavaScript documentation directly from source code

I'm looking for a tool to generate the documentation for JavaScript functions and properties even if there are no appropriately formatted comment blocks associated with those functions or properties (like Doxygen does). This comparison between JSDoc…
Greg
  • 8,230
  • 5
  • 38
  • 53
15
votes
2 answers

How to run jsdoc on whole directory in ubuntu

I just need to run jsdoc on ai whole directory containing .js files, I am doing this on individual files in ubuntu terminal by issuing command jsdoc abc.js but what I need is to apply this command on all files in the directory at once,so that all…
SQA
  • 151
  • 1
  • 1
  • 4
15
votes
3 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,761
  • 7
  • 32
  • 58
13
votes
4 answers

TypeScript strips down comments and spoils JSDoc documentation

The objective is to get JSDoc documentation from TypeScript code. The quality of documentation from TypeDoc (TypeScript documentation solution) isn't acceptable because the documentation is targeted at JS users and shouldn't be flooded with the…
Estus Flask
  • 206,104
  • 70
  • 425
  • 565
13
votes
2 answers

How to create jsdoc types from json schemas

I have tons of json schema for node.js project. Can I use them in any way for: Accessing them as jsdoc types from ".js" code files to increase webstorm intellisense accuracy Or for creating jsdoc type definitions automatically ?
uzay95
  • 16,052
  • 31
  • 116
  • 182
12
votes
4 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
  • 490
  • 3
  • 6
  • 14
12
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,512
  • 20
  • 28
12
votes
3 answers

JSDoc: reference @param of method in another @param

I am new to using JSDocs and couldn't find an answer to this question. Suppose I wanted to write this simple function: function hasQ(array, item) {return array.includes(item);} which with JSDoc's I would mark-up like: /** * Another way to call…
SumNeuron
  • 4,850
  • 5
  • 39
  • 107
12
votes
3 answers

Can JS Doc generate PDF

I am using JS Doc version 3 (https://github.com/jsdoc3/jsdoc). When I run the tool, by default it generates documentation in HTML format. Is it possible to generate doc in PDF format?
Sai
  • 2,089
  • 3
  • 19
  • 30
12
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
  • 131
  • 1
  • 4
1
2
3
19 20