In JSDoc, the best documentation I can find shows to use the following if you have an array of a specific type (such as an array of strings) as:  /**  * @param {Array.<string>} myStrings All my awesome strings  */  function blah(myStrings){...
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  {TouchEven...
How do I document a method in JavaScript using JSDoc when the parameter type can be mixed?  I have method on a Dialog object where I can show HTML or my own Viewable objects. The method JSDoc looks like this:  /**  * Can pass in viewable object, or s...
I have an array that looks like this:  [{     "name": "c917379",     "email": "[email protected]"  }, {     "name": "c917389",     "email": "[email protected]" }]   It is an array of arbitrary length...
According to the JSDoc wiki for @param you can indicate a @param is optional using    /**     @param {String} [name] */ function getPerson(name) { }     and you can indicate a param inline using  function getPerson(/**String*/ name) { }   And I can c...
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....
WebStorm does a very good job of resolving functions which are returned from CommonJS modules as methods (and reads JsDoc associated with them), like for instance:  // utils/valid.js /**  * Returns true no matter what.  * @param {HTMLElement} element...
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 th...
This is a similar to question 30360391. I want to express that the parameter of a function is a plain JS object that can have arbitrary properties (with unknown) names but all properties are objects themselves with fixed properties.  An example: The...
In Google Closure, if an Array of a specific @type {Array.<type>} is initialized, can I be sure that Google Closure will confirm the Array contents?  Here is a small test case. It appears to me that an {Array.<string>} is sneaking past an...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.