jsdoc

How to display Javascript methods in a 'group' in JSDOC?

坚强是说给别人听的谎言 提交于 2019-12-31 22:01:50
问题 Is there are possibility to 'group' functions within a class (AMD/RequireJS Module) ? My classes have sometimes over 20+ functions which actually belong to a specific 'interface implementation' and sometimes they just need to be grouped for better readability. I checked the available jsDoc tags but none of them seem to provide this, in Doxygen there are number of tags... Any ideas? 回答1: this is one way to do it, your module shape may very, but this works with classes and modules: /** *

How to display Javascript methods in a 'group' in JSDOC?

给你一囗甜甜゛ 提交于 2019-12-31 22:01:25
问题 Is there are possibility to 'group' functions within a class (AMD/RequireJS Module) ? My classes have sometimes over 20+ functions which actually belong to a specific 'interface implementation' and sometimes they just need to be grouped for better readability. I checked the available jsDoc tags but none of them seem to provide this, in Doxygen there are number of tags... Any ideas? 回答1: this is one way to do it, your module shape may very, but this works with classes and modules: /** *

What JSDoc tags to use when creating objects with factory i.e. mylib.create()

匆匆过客 提交于 2019-12-25 03:43:13
问题 My CommonJS module uses a factory style object creation (.create()) and I try to have JSDoc style documentation but cannot figure out which JSDoc tags @class , @module etc. I should to use to do it nicely. Below you can see a simplified structure of the module. var MyLib = function () { this.msg = 'Hello'; }; exports.create = function () { return new MyLib(); }; MyLib.prototype.greet = function () { console.log(this.msg); }; The lib is used in the following way. User does not know and does

JsDoc to PDF renderer

青春壹個敷衍的年華 提交于 2019-12-24 00:16:03
问题 Does anyone know a tool to convert JsDoc to PDF ? Or you have to do that trough convert HTML files into PDF ? Thanks for answer ! 回答1: The JSDoc converters I'm aware of are written in JavaScript and are hard-coded to produce HTML tags. The best HTML->PDF converter I'm aware of is WKHTMLToPDF. It uses web kit to render the PDF, along with QT's PDF library by the look of it. So it need some sort of *NIX environment to run. There are quite a few others floating about, some apps, some services.

AngularJS: Method expression is not of Function type

馋奶兔 提交于 2019-12-23 23:06:27
问题 Having a class defined as: angular.module('trip') /** @class MyClass */ .factory('MyClass', [Factory]); function Factory() { return function(){ // fields & functions } } Then in the code I would instantiate a new object: /** * @param {MyClass} MyClass */ function(MyClass){ var myClass = new MyClass(); // HERE MyClass is highlighted in phpStorm } When calling new MyClass(); the MyClass is highlighted in phpStorm and I get this warning: Method expression is not of Function type What does it

Getting JSDoc output in JSON format

假装没事ソ 提交于 2019-12-23 21:56:31
问题 Is there any way to configure JSDoc such that the output is in JSON format instead of the usual HMTL format? 回答1: There is an option "-X" ("explain") which creates a JSON file with parsed AST. jsdoc -X ./mylib/ > jsdoc-ast.json To understand this JSON you can use documented schema: https://github.com/jsdoc3/jsdoc/blob/master/lib/jsdoc/schema.js 来源: https://stackoverflow.com/questions/25210156/getting-jsdoc-output-in-json-format

tslint error: Asterik in jsdoc must be aligned

半腔热情 提交于 2019-12-23 18:04:29
问题 I keep getting this tslint error and don't see what's wrong with the code. Does anybody see an issues with the jsdoc asteriks below not being aligned correctly: /** * @ngdoc directive * @module ers.components.button * @scope * @transclude * @data * @binding * @name ersButton * @restrict E * @constructor * * @description * * A button performs the defined action when the user clicks it. * * - Buttons can only consist of text and/or an icon. * - Buttons must contain either a click event, an href

Javascript API documenting framework with lightweight mark-up

丶灬走出姿态 提交于 2019-12-23 14:07:21
问题 I'm seeking a Javascript API documenting framework with features similar to JSDoc, but would use easy-to-type restructured text or markdown in the code comments (not html) Bonus: would integrate well with Sphinx. However, I don't want to maintain separate documentation, but generate API documentation from comments. http://code.google.com/p/jsdoc-toolkit/ 回答1: I finally found JSDuck the most suitable for the task: https://github.com/senchalabs/jsduck 回答2: InvisibleJS supports markdown and a

Javascript API documenting framework with lightweight mark-up

放肆的年华 提交于 2019-12-23 14:04:49
问题 I'm seeking a Javascript API documenting framework with features similar to JSDoc, but would use easy-to-type restructured text or markdown in the code comments (not html) Bonus: would integrate well with Sphinx. However, I don't want to maintain separate documentation, but generate API documentation from comments. http://code.google.com/p/jsdoc-toolkit/ 回答1: I finally found JSDuck the most suitable for the task: https://github.com/senchalabs/jsduck 回答2: InvisibleJS supports markdown and a

How to escape @ sign inside JSDoc comments in NetBeans

五迷三道 提交于 2019-12-23 07:46:12
问题 I have a simple method in API, that allows searching objects with JSONPath. As its syntax is pretty much unfamiliar to junior developers, i decided to provide some examples within JSDoc comment. Yet, here is the catch, - @ sign is treated as a start of new jsdoc-tag, and so description becomes corrupted. Question: how to make NetBeans (or jsdoc in general) ignore @ signs inside of particular code chunk ? Preferably, within @example block. So this code, would show unmodified within tooltip: $.