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

How do you document the mandatory presence of a header?

I know, there is jsdoc documentation, but I could not find my answer there, so I apologize if my question seems stupid. I need the API documentation to indicate the need for the x-auth-token header with the value of the previously obtained token.…
0
votes
1 answer

JSDoc doesn't print a param of a custom type (typedef)

I've defined a custom type via @typedef: /** * @typedef {Object} FILE_DATA * @property {NodeJS.ReadableStream} fileStream * @property {string} fileUUID */ Then I apply this custom type in a method signature: /** * Upload file to Dropbox * *…
Mike
  • 14,010
  • 29
  • 101
  • 161
0
votes
1 answer

JS Doc: How to define the object returned by a javascript es6 class as a custom type?

I have somewhat of the following code: export class Logger { constructor(label = null, options = {}) { if (!winston.loggers.has(label)) { winston.loggers.add( label, { /* ...default options */ } ); …
Kiran
  • 340
  • 2
  • 11
0
votes
0 answers

How to use JSDoc to document my structure?

Below is my code structure: const kind = []; kind.sample= factory( function() { const sample = {}; sample.init = function() {...} const privateFunction = function() {...} return sample; } ); function factory( protoFn ) { return () =>…
Reza
  • 3,473
  • 4
  • 35
  • 54
0
votes
1 answer

Document constraints in JSDoc

I have a function which is a React component. The element it creates has position:absolute; In order for this property to work in a predictable way the parent element should be positioned with position: relatieve;. I would like to let future users…
Ben Carp
  • 24,214
  • 9
  • 60
  • 72
0
votes
1 answer

JSDoc: specifying the type of an Object passed as a parameter?

I have a method in a module. It takes an object that is an instance of a very specific class. For example: /** Validate a unit against the database's list of valid units * @param {Object} db - ??? * @param {string} unit - unit to…
SpidaFly
  • 21
  • 2
0
votes
1 answer

How to use Enum annotation from JSDoc in Object properties

I started to use more often the jsdocs and I searched around how to use the enum type and still a doubt about it. Here are the usage definition at JSDocs: Enum definition at JSDocs The example showed is about a single enum object, how it would work…
0
votes
2 answers

JSDoc, documenting an dictionary with default entries

In typescript I can document a dictionary/map that has certain given entries but is still a dictionary/map (as you can add or remove entries) like this type Foo = { bar: number; moo: number; [key: string]: number; }; Is there a JSDoc…
gman
  • 100,619
  • 31
  • 269
  • 393
0
votes
1 answer

Jsdoc array with more than one different thing in array

I want to do jsdoc with something like the following /** @param {string|number[]} */ In the above it's an array of numbers or a string, but I want an array of numbers and/or strings. I need this to work for other things like 2 different kinds of…
Spam
  • 1
  • 2
0
votes
1 answer

Create own type in documentation

I want to have a nice documentation and that is why I want to write: @param {(device)} device and when I click on parameter device I want to see something…
Tomasz Waszczyk
  • 2,680
  • 5
  • 35
  • 73
0
votes
1 answer

I cannot find my "unexpected token error" in my JS code given by JSDoc during the parsing phase

I am trying to document my javascript with JSDoc. However, it won't parse this code due to a "unexpected token error located in the 4th line of the following code. I've looked through the entire code block with luck. /** Create a new sorter given a…
0
votes
1 answer

How does one reference a module as a param in JSDocs

Given a module like: /** Config module * @module Config */ export default class Config { ... How do I specify a link to the Config module when specified as a param? /** * Foo * @module Foo */ export default class Foo { /** * Create a…
Samuel Goldenbaum
  • 18,391
  • 17
  • 66
  • 104
0
votes
1 answer

JSDoc 3 conf.json include not working

I am trying to build a project using JSDoc-3.5.5. I am currently trying to run a test for errors using a small sample of the files for the project. I manually included a few files in my conf.json file but when I run the test the terminal tells me…
mattc-7
  • 432
  • 1
  • 10
  • 24
0
votes
1 answer

JSDoc 3 How to Read .c or .h files that have #include? (# is an illegal character)

I am currently trying to use JSDoc 3 to generate a documentation guide in HTML. Some of the files I am using to make the guide are .h and .c files that contain lines of code beginning with #include and #ifndef. However, when I run the jsdoc, I get…
mattc-7
  • 432
  • 1
  • 10
  • 24
0
votes
2 answers

Why is JavaScript function documentation outside the function?

In JavaScript, most documentation formats seem to put a block above the function: /** * example JavaScript docstring */ function myFunction(){...} (example: JSDoc) In Python however, most documentation formats use documentation inside the…
waterproof
  • 4,943
  • 5
  • 30
  • 28