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 can I JSDoc my enumify "enums"?

Using the Enumify library. I want to document the enums I create, e.g., import { Enum } from 'enumify'; class CMD extends Enum {}; CMD.initEnum({ REBOOT: { byte: 0x00 }, SLEEP: { byte: 0x01 }, }); export default CMD; In mainline code…
Dave Newton
  • 158,873
  • 26
  • 254
  • 302
0
votes
1 answer

gulp watch files update jsdoc

I'm trying to watch some files in a directory and automatically update there documentation with jsdoc. I use gulp to watch the file and run jsdoc see code below. const gulp = require('gulp'); const watch = require('gulp-watch'); const jsdoc =…
Emil Rowland
  • 538
  • 5
  • 25
0
votes
1 answer

jsdoc fields not parsed

Why are my fields getting ignored by jsdoc? /** * Matrix object for operations on matrices * @constructor * @param {number[][]} m - values * @param {number} def - default size def x def */ function Matrix(m, def){ /** number[][] -…
user9648914
0
votes
2 answers

How to document field with dash with JSDoc

Given an object definition that I'm not allowed to modify: let a = {"a-b" : 5}; How can I add JSDoc over it ? I tried /** * @type {{"a-b": number}} */ But WebStorm tells me that this is not valid JSDoc.
manuc66
  • 2,701
  • 29
  • 28
0
votes
0 answers

PhpStorm with JSDoc OOP problems

As I am not sure which responsibilities are taken by JSDoc and which by PhpStorm, I just describe a problem. Imagine a simple class inheritance. All works fine except static method. You can see an example: As you can see B.s is not marked by…
FreeLightman
  • 2,224
  • 2
  • 27
  • 42
0
votes
1 answer

typedoc/jsdoc document generic parameter (callback arguments)

I have the following code: type AlarmEvent = events.Event<(name: Alarm) => void>; As you can see, the event class takes a generic parameter in the form of a function signature, which I'd like to document. Any ideas?
Lusito
  • 933
  • 8
  • 10
0
votes
1 answer

When does one negate the return value in JSDoc?

I see this a lot in the Protractor documentation, /** * ... * ... * * @returns {!webdriver.promise.Promise} A promise which resolves to the * number of elements matching the locator. */ What is going on there with the negation of the…
javafueled
  • 494
  • 1
  • 5
  • 23
0
votes
0 answers

How to document function methods and prototypes from within IIFE using JSDoc

I have struggled to try and figure out a good way of doing this, but to no avail. Maybe someone here can help me document an IIFE like the following var module = (function(){ var main = function() { return…
wackozacko
  • 682
  • 1
  • 8
  • 18
0
votes
1 answer

How to document a function returned by a function using JSDoc without modifying the latter one?

This question is very similar to another one on this site, except that there is one more restriction: I cannot modify the function that creates new functions. Let's say we have an object named someObject with a method called addMethod that can be…
Jean-François Beauchamp
  • 5,485
  • 8
  • 43
  • 77
0
votes
1 answer

Documentation for Javascript code in RStudio?

RStudio has support for ROxygen for generating documentation for R code. My R package has a fair bit of Javascript code in it. Has anyone written an RStudio plugin to support Javascript documentation, using JSDoc for example? I'd like the…
user2554330
  • 37,248
  • 4
  • 43
  • 90
0
votes
1 answer

array of allowUnknownTags doesnt work

I have the latest of JsDoc (3.4.3), and as per the documentation of JsDoc, I added array of unknown tags, but got slapped with error of unknow tag The @foo: tag is not a known tag. "allowUnknownTags": [ "foo", "usage", "test" ] Am I missing…
Sheetal
  • 91
  • 1
  • 7
0
votes
1 answer

WebStorm and jsdoc3, defining allowed parameters doesn't work?

Based on the documentation, the JSDoc implementation in WebStorm seems to be very limited. Is there anyway to extend it? I can't find any plugins. Specifically, I would like "allowed parameters" to work (as implemented 2014-04-11)
user736893
0
votes
1 answer

How to document functions within a module using jsdoc?

/** * Displays the list of autolab commands along with their functions. * @module lib/help */ var Table = require('cli-table'); var chalk = require('chalk'); var helpjson = { 'init' : 'Initializes local repository and…
Vaibhav Garg
  • 107
  • 1
  • 8
0
votes
1 answer

What is the correct way to specify an object's class with the JSDoc 3 syntax?

If my code creates a pre-ecmascript 6 style "class", i.e. a constructor function like this: function MyDBPlugin() { // ... } and I am using the JSDoc3 scheme to document another function that takes an instance of MyDBPlugin as an argument, how…
the_velour_fog
  • 2,094
  • 4
  • 17
  • 29
0
votes
1 answer

Can JSDoc link to source line?

Is there some way to get jsdoc to link directly to the line in the source code file instead of just to the beginning of the file?
J Zakula
  • 3
  • 1