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

Closure Compiler JsDoc annotations to replace tests in source code?

Are the JSDoc annotations sufficient to test parameters validity? Example: in the following "add" method, the parameter (Point object) is defined as Non-nullable Point type. In this method and using Closure Compiler, can I then skip the code…
J.P. Duvet
  • 630
  • 6
  • 16
0
votes
2 answers

JSDoc cannot parse config file SyntaxError: Unexpected token :

I am using JSDoc 3.4.3 and I'm trying to run config.json file to create documentation for multiple files. However every time I try to run the following command: jsdoc -c conf.json I get this error: Cannot parse the config file conf.json:…
dsvorc41
  • 45
  • 1
  • 7
0
votes
1 answer

JSDoc Tutorial Include Source File

I have a JavaScript project that's documented using JSDoc3, and I'm working on adding tutorials (written in HTML). I have example code in my project consisting of a series of scripts that the user can run, and I'm essentially writing tutorials to…
benbotto
  • 2,291
  • 1
  • 20
  • 32
0
votes
1 answer

JSDOC datatype in @param

In jsdoc @param, We can write like: /** * @param {Object} somebody- The employee who is responsible. */ function sayHello(somebody: ABC) { alert('Hello ' + somebody); } If I have a class like ABC and somebody is an…
AngularDoubts
  • 459
  • 2
  • 11
  • 30
0
votes
1 answer

WebStorm : Jsdoc unresolved function or method for console.debug()

I am getting this error on WebStorm "Unresolved function or method" while implementing console.debug(). I have already added the HTML, HTML 5 in Settings->Languages & Framework->Javascript-> Libraries. Any leads will be helpful. Thank you in…
0
votes
1 answer

Documenting a class in an AMD module with JSDoc 3

I'm trying to document a class in an AMD JavaScript module using JSDoc 3. Here's my code, based on the example in the documentation here: /** * A module representing a jacket. * @module my/jacket */ define('my/jacket', function() { /** *…
ChrisN
  • 16,635
  • 9
  • 57
  • 81
0
votes
1 answer

JSDoc: How to add functions to Nav Bar

In jsdoc default template, nav bar is constructed in publish.js buildNav function. e.g. nav += buildMemberNav(members.events, 'Events', seen, linkto); However, there's no members.functions. I'd like to know how to list all the functions (under…
shrekshao
  • 388
  • 4
  • 12
0
votes
1 answer

How to use jsdoc options in jsdoc-grunt task

I want to add the -p flag in order to generate documentation for private methods using grunt-jsdoc. How can I do that? According to the documentation at grunt-jsdoc they state that we can use any of the options specified in the useJsDocCli, however…
John
  • 10,165
  • 5
  • 55
  • 71
0
votes
2 answers

How to avoid "new" in JavaScript factory function's documentation (or a better way to document its return type)?

Let's say I have a factory function like this: function Person(name, age) { return {name: name, age: age}; } Using JSDoc3, I tried to document that function in the following way: /** Creates a Person object * @param {String} name The name of…
FriendFX
  • 2,929
  • 1
  • 34
  • 63
0
votes
0 answers

Documenting revealing pattern nested in another function using JSDocs

I'm new to attempting to use JSDocs, and I've recently just learnt about closures, modules in javascript. I'm trying to document my js file that has the following basic structure (there are actually many more parameters and methods). I've tried…
Rob G
  • 140
  • 1
  • 11
0
votes
1 answer

How do I document a module where module.exports is a function?

I'm trying to document a node module that exports a function, but I'm not getting any reference to the function in my jsdocs output. The output, using the default template, Just looks like this: Module: testModule With nothing under the…
hal
  • 4,845
  • 7
  • 34
  • 57
0
votes
1 answer

jsdocs3 No docs generation

This is my first time using jsdocs3 and I am not able to generate my documentation. I created a file app.js and inserted the following comments:- /** * Main file - All modules are loaded. * @author My Name * */ Then I ran the command…
tumulr
  • 133
  • 4
  • 11
0
votes
1 answer

How do I document symbols with a depth greater than 2 in JSDoc?

I have an object that contains multiple methods and is a member of a class. How would I document this with JSDoc? Here's my attempt. With this SomeClass#helperFunctions is documented, but both of it's methods are omitted. /** * @class…
hal
  • 4,845
  • 7
  • 34
  • 57
0
votes
0 answers

JSDoc: Node.js require statement replaces class definition

In my Node.js project, I have normal class definitions like: /** * My awesome class. * @constructor */ var MyClass = function MyClass() {} And in another file I require it like: var MyClass = require('./myclass.js').MyClass; But sometimes JSDoc…
Jeff T
  • 1
  • 1
0
votes
2 answers

Looking for auto API documentation wiki solution based on jsdoc

We have big piece of JS code, documented with jsdoc syntax, which we would like to include in internal wiki in an automated manner. Accordingly, i am looking for wiki solution that is able to auto generate pages with jsdoc from our code base. Any…
folky
  • 81
  • 1
  • 6