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...
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 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...
I search to understand how operate jsdoc, the generator of javascript documentation. When I use it, I have always all my documentation files on index.js and never the navigation (in the documentation web site) in my files, classes or modules. Further...
I have a parameter that could simply be described as:    /**  * @param {String} source  */   source value can be only a set of predefined values, e.g. "youtube", "vimeo".  How to document the accepted range of source values?...
I have a simple ES6 class and I'm wondering how to properly describe it in JSDoc. Note that I want to define my own type, which later would be recognized by WebStorm autocomplete.  Is below example valid?  /** * @typedef {Object} View * @class */...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.