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...
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 have a function with an array of objects as parameter and would like to describe the parameter (including the properties of the objects in the array) using JSDOC like in this example:  /**  * @param {Array.<Object>} filter - array of filter o...
I am trying to create custom tags in jsdoc 3.4.2.  The config.json  file is   {     "tags": {         "allowUnknownTags": true,         "dictionaries": ["jsdoc","closure"]     },      "source": {...
JSDoc 3's documentation includes this example:  /**  * The complete Triforce, or one or more components of the Triforce.  * @typedef {Object} WishGranter~Triforce  * @property {boolean} hasCourage - Indicates whether the Courage component is pres...
Is it possible to use an enum for the JSDoc @param type declaration like in the following example?  /**  * @enum { Number }  */ var TYPES = {     TYPE_A: 1,     TYPE_B: 2 }  /**  * @param { TYPES } type  */ function useTypesEnum( type ) {  }   If I u...
UPDATE: @spenibus helped me reach the conclusion that this may be an issue with JSDoc itself. I added my findings to this open issue on their GitHub. @spenibus found a solution, but it requires a slightly altered version of the IIFE  I'm using an...
I have a custom-built JavaScript framework that I inherited from the person that worked here before me. What I can say is that it's a web app of sorts that leverages jQuery.  There are a lot of events being fired by various objects that I'd l...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.