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...
Let's say I have a file named "File1.js". In this file, I export an object of objects and I give each object a typedef, like so.  /**  * My typedef for each object.  * @typedef {Object} MyObject1  * @property {String} username Your userna...
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....
I have 2 types of Modules:  Require.js Main File:      require.config({       baseUrl: "/another/path",       paths: {         "some": "some/v1.0"       },       waitSeconds: 15,       locale: "fr-fr"     });       req...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.