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
5
votes
1 answer

JSDoc: property name

Is there a way to make a correct description for a property with special symbols like "+" in jsdoc? Example: /** * @typedef {Object} TestObject * @property {string} "id+name" */ "id+name" seems to be an invalid syntax in this case.
shadeglare
  • 7,006
  • 7
  • 47
  • 59
5
votes
1 answer

JSDoc - specifying mandatory parameter syntax

I am using @JSDoc to create documentation for my javascript library. I know how to indicate optional parameter. like below /* * @param {string} [somebody] - Somebody's name. */ function sayHello(somebody) { if (!somebody) { somebody =…
Ganesh K
  • 2,623
  • 9
  • 51
  • 78
5
votes
1 answer

JSDoc: Why aren't my nested objects links (why aren't they click-able)?

I would think that all members / objects / etc. documented by JSDoc should be their own click-able links; e.g., if I have levelOne --> levelTwo --> levelThree --> levelFour, then I should see levelOne on the first page and be able to click my way…
5
votes
1 answer

JSDoc CommonJS with exports object passed into IIFE

UPDATE: @spenibus helped me reach the conclusion that this may be an issue with JSDoc itself. I added my findings to this open issue on their GitHub. @spenibus found a solution, but it requires a slightly altered version of the IIFE I'm using an…
ejfrancis
  • 2,925
  • 4
  • 26
  • 42
5
votes
2 answers

JSDoc: How to avoid duplicate documentation for properties/getters?

I am currently documenting one of my APIs using JSDoc. Although this works well, one thing that really annoys me is the occurence of duplicate documentation. One common example of this is the documentation of a property and its getter: function…
BlackWolf
  • 5,239
  • 5
  • 33
  • 60
5
votes
2 answers

JSDoc3: How to document a AMD module that returns a function

I'm trying to find a way to document AMD modules using JSDoc3. /** * Module description. * * @module path/to/module */ define(['jquery', 'underscore'], function (jQuery, _) { /** * @param {string} foo Foo-Description * @param…
Jens Simon
  • 61
  • 4
5
votes
4 answers

Documenting the return of a javascript constructor with jsdoc

I have a javascript function that returns a constructor (see code sample below). How would I document this with the @returns tag of jsdoc. It doesnt seem correct to do @returns {MyConstructor} because that implies I am returning an instance of…
computrius
  • 690
  • 7
  • 16
4
votes
0 answers

Integrate jsdoc into docsify

Im trying to document my node.js/javascript application. The frontend is a vue app & backend a node.js app. I use jsdoc to document classes/modules etc. and need a way to integrate that into docsify. At first i wanted to document the whole…
Marc
  • 2,920
  • 3
  • 14
  • 30
4
votes
2 answers

JSDoc: How to set @param for React element as a function param?

What should I add in the JSDoc @param block in the example below for my IntelliJ Webstorm IDE to stop throwing the error: Argument Type ComponentClass is not assignable to parameter type ??? ... `? /** * Renders the passed component into…
clodal
  • 1,615
  • 20
  • 33
4
votes
1 answer

How to use jdoc to describe a function that receive a complex object with dynamic properties like a json schema

Example: /** * * @param {any} data - Object to be validated * @params {Object} schema - JSON schema * @params {Object} schema.properties - JSON schema properties * ** @params {string} schema.properties[any].type - field property type…
4
votes
2 answers

Commenting Angular 2 / Ionic 2 project with JSDoc

I am trying to start documenting my Ionic 2 app using JSDoc but I am having difficulty using it with Angular 2's syntax. For example, I have the following code at the top of my app: import {App, Events, IonicApp, Platform} from…
Daniel Hutton
  • 1,455
  • 1
  • 17
  • 33
4
votes
2 answers

How to write space in default values of properties in jsdoc

I can't find a way to print space when documenting properties default values in JSDOC. Example: /** * @prop {string} str='String with space' - The string. */ This will be documented as: Name Type Default Description str string…
Ardit Meti
  • 571
  • 5
  • 22
4
votes
1 answer

JSDoc reference function in object literal (CommonJS module.exports)

I'm writing a CommonJS module and have all of my methods defined as function definitions within the module. Those methods are then defined in the module.exports object. This is all written with es6 as well. However, with my annotations, the…
hellatan
  • 3,517
  • 2
  • 29
  • 37
4
votes
1 answer

Documenting prototype property and method with JSDoc-3.3.0-alpha5

I have a class named FileDownloader and I've tried documenting it, but the properties and method declared using prototype aren't generated in the output file. As stated on the title, I use jsdoc 3.3.0-alpha5. Here's the code: /** * @class *…
Riko Nagatama
  • 388
  • 1
  • 3
  • 15
3
votes
1 answer

JSDoc: How do you include a custom css file template in your generated docs?

The JSDoc docs say Copying a directory of images to the output directory. To copy all of the static files in ./myproject/static to the output directory: "default": { "staticFiles": { "include": [ "./myproject/static" …
Sam
  • 1,765
  • 11
  • 82
  • 176