jsdoc3

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

萝らか妹 提交于 2019-12-21 10:51:50
问题 I am working on an app wich 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. Untill now I understand that JsDoc documentation is split into four main sections: Modules, Classes, Tutorials, Globals. Each section has a header dropdown menu and a sidebar each of them listing all of the modules in liniar fashion, alphabetically. I was wondering if there

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

人走茶凉 提交于 2019-12-21 10:50:52
问题 I am working on an app wich 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. Untill now I understand that JsDoc documentation is split into four main sections: Modules, Classes, Tutorials, Globals. Each section has a header dropdown menu and a sidebar each of them listing all of the modules in liniar fashion, alphabetically. I was wondering if there

create custom tags with jsdoc

给你一囗甜甜゛ 提交于 2019-12-21 04:50:56
问题 I am trying to create custom tags in jsdoc 3.4.2. The config.json file is { "tags": { "allowUnknownTags": true, "dictionaries": ["jsdoc","closure"] }, "source": { "include": [ "app/" ], "exclude": [], "includePattern": ".+\\.js(doc|x)?$", "excludePattern": "(^|\\/|\\\\)_" }, "plugins": [ "plugins/custom-tags.js" ], "templates": { "cleverLinks": false, "monospaceLinks": false }, "opts": { "destination": "./docs", "recurse": true, "encoding": "utf8" } } In the custom-tags.js i have added these

What's the proper way to document callbacks with jsdoc?

橙三吉。 提交于 2019-12-20 08:35:46
问题 I've spent quite a while scouring the internet looking for the best way to properly document callbacks with jsdoc, but unfortunately, I haven't found a great one yet. Here's my question: I'm writing a Node.js library for developers. This library provides multiple classes, functions, and methods that developers will be working with. In order to make my code clear and understandable, as well as to (hopefully) auto-generate some API documentation in the future, I've started using jsdoc in my

What's the proper way to document callbacks with jsdoc?

对着背影说爱祢 提交于 2019-12-20 08:32:15
问题 I've spent quite a while scouring the internet looking for the best way to properly document callbacks with jsdoc, but unfortunately, I haven't found a great one yet. Here's my question: I'm writing a Node.js library for developers. This library provides multiple classes, functions, and methods that developers will be working with. In order to make my code clear and understandable, as well as to (hopefully) auto-generate some API documentation in the future, I've started using jsdoc in my

JSDoc UML Diagram

泪湿孤枕 提交于 2019-12-18 12:27:50
问题 Question: I'm editing and using an open source javascript library that has JSDoc tags in its code. I was wondering if anyone knew of a JSDoc plugin that would allow me to generate a class diagram from the JSDoc tags. Edit I decided to try out js/uml and found the following. The JS/UML eclipse extension requires an older version of Eclipse (Indigo) and a non-supported dependency library UML2tools. I found the dependencies needed and according to the Eclipse software manager installed correctly

JSDoc: Return object structure

▼魔方 西西 提交于 2019-12-18 09:59:10
问题 How can I tell JSDoc about the structure of an object that is returned. I have found the @return {{field1: type, field2: type, ...}} description syntax and tried it: /** * Returns a coordinate from a given mouse or touch event * @param {TouchEvent|MouseEvent|jQuery.Event} e * A valid mouse or touch event or a jQuery event wrapping such an * event. * @param {string} [type="page"] * A string representing the type of location that should be * returned. Can be either "page", "client" or "screen".

JSDoc: Return object structure

会有一股神秘感。 提交于 2019-12-18 09:58:56
问题 How can I tell JSDoc about the structure of an object that is returned. I have found the @return {{field1: type, field2: type, ...}} description syntax and tried it: /** * Returns a coordinate from a given mouse or touch event * @param {TouchEvent|MouseEvent|jQuery.Event} e * A valid mouse or touch event or a jQuery event wrapping such an * event. * @param {string} [type="page"] * A string representing the type of location that should be * returned. Can be either "page", "client" or "screen".

JSDoc comments for destructuring parameters not working in VSCode

大憨熊 提交于 2019-12-11 07:27:23
问题 According to the doc, JSDoc supports destructuring parameters: /** * Assign the project to an employee. * @param {Object} employee - The employee who is responsible for the project. * @param {string} employee.name - The name of the employee. * @param {string} employee.department - The employee's department. */ Project.prototype.assign = function({ name, department }) { // ... }; However, it doesn't work for me in VSCode (v1.23.1). Has anyone successfully tried this? VSCode and TypeScript

jsdoc : reference typedef-ed type from other module

假装没事ソ 提交于 2019-12-08 18:58:27
问题 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 page generated by jsdoc, the type is displayed as a link to the typedef-ed module ? I tried variations of this, but nothing seems to work... // somewhere_else/bar.js /** * @module */ /** * @param {somewhere/foo/Foo} foo - some param */ export default