jsdoc

How to force newlines in Google Apps jsdoc descriptions

不问归期 提交于 2019-12-21 04:03:02
问题 I can't figure out how in a Google Apps Script to display this correctly. I need it to display new lines in the jsdoc output(e.g. when the function tooltip window comes up in a Spreadheet functions.) I have tried html like however it is just rendered as text and not a line break. For example: /** * Converts the prefixed value to the specified base. * Requires one of the following prefixes: * '0b' Base 2: binary * '0q' Base 4: quaternary * '0o' Base 8: octal * '0x' Base 16: hexadecimal * *

How to JsDoc a “mixed” type?

馋奶兔 提交于 2019-12-21 03:10:53
问题 Simple question, how do I document that "Mixed-type"? I know I could just list all possible types like {null|undefined|String|Number|Object} and end up finding myself missing one and making it overly complex. I tried using the Mixed keyword, but it popups errors in many IDEs such as WebStorm. 回答1: I found the way to do it: /** * @param {*} foo */ function bar(foo) {} 回答2: Use {} There is an example from http://usejsdoc.org/tags-type.html: An object called 'myObj' with properties 'a' (a number

_Best Practices for JSDoc'ing Javascript files written in the “revealing module pattern” Style? [closed]

ぐ巨炮叔叔 提交于 2019-12-20 19:39:41
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . Most of my Javascript functions are relatively simple, and called for their sideeffects: I use jQuery to manipulate the DOM or make Ajax-calls. I prefer to write my functions in the "revealing module pattern" style. I just discovered that JSDoc- annotating Javascript files has

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 for showing optional arguments in Google Sheets autocomplete dropdown

╄→尐↘猪︶ㄣ 提交于 2019-12-20 02:54:06
问题 I'd like to document (in the Google Sheet autocomplete) a custom function with optional arguments, similar to the WEEKDAY function (autocomplete below). The JSDoc spec on optional arguments does not work. Google does not seem to document this anywhere. How can I create a function with the same visual treatment (both in the argument description and the Example) that Google has? /** * Summary of function * @param {"example"} arg Argument description * @param {"optional"} opt_arg This argument

Komodo Edit autocompletion JS object literal

孤街醉人 提交于 2019-12-19 11:18:50
问题 The problem is Komodo intelli-sense doesn't see object methods defined this way: var App = window.App || { method: function() { ... } } Typing "App." gives no result. However, defining an object like below works fine: var App = { method: function(){ } } How to make autocompletion working at first example pattern? 回答1: Komodo has a macro API which can automate switching between the two patterns. Use the Add macro context menu option to create a new macro and paste the following code: komodo

Komodo Edit autocompletion JS object literal

早过忘川 提交于 2019-12-19 11:16:12
问题 The problem is Komodo intelli-sense doesn't see object methods defined this way: var App = window.App || { method: function() { ... } } Typing "App." gives no result. However, defining an object like below works fine: var App = { method: function(){ } } How to make autocompletion working at first example pattern? 回答1: Komodo has a macro API which can automate switching between the two patterns. Use the Add macro context menu option to create a new macro and paste the following code: komodo

How do you document an array of objects as a parameter in JSDoc?

懵懂的女人 提交于 2019-12-18 14:55:10
问题 I have an array that looks like this: [{ "name": "c917379", "email": "jim@bmw.de" }, { "name": "c917389", "email": "jane@bmw.de" }] It is an array of arbitrary length with a number of repeating fields ( I've reduced this to two fields for clarity ). This gets passed into a JavaScript method. /** * @param {?} data */ update: function(data) {...} I was wondering how you would document this in JSDoc. Ie. how would you document the type where the question mark is? 回答1: I just figured out the

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