I am using JS Doc to generate docs for JS. I have an enum with few values. I want to generate docs for each property. I tried the following:
/**
* Enum for display state.
* @readonly
* @enum {string}
*/
var DisplayState = {
/** @member {string} */
foreground: 'foreground',
/** @member {string} */
background: 'background',
/** @member {string} */
projected: 'projected'
};
But after HTML page is generated, I only see doc for enum type not individual properties.
I've tried the following /** some ment */ /** @member {string} */ And /** @property {string} */ but nothing seems to work
I am using JS Doc to generate docs for JS. I have an enum with few values. I want to generate docs for each property. I tried the following:
/**
* Enum for display state.
* @readonly
* @enum {string}
*/
var DisplayState = {
/** @member {string} */
foreground: 'foreground',
/** @member {string} */
background: 'background',
/** @member {string} */
projected: 'projected'
};
But after HTML page is generated, I only see doc for enum type not individual properties.
I've tried the following /** some ment */ /** @member {string} */ And /** @property {string} */ but nothing seems to work
Share Improve this question edited Oct 10, 2016 at 19:36 Sai asked Oct 10, 2016 at 19:10 SaiSai 2,1093 gold badges20 silver badges31 bronze badges 6-
have you tried removing
@member
? – Daniel A. White Commented Oct 10, 2016 at 19:14 - usejsdoc/tags-enum.html – Daniel A. White Commented Oct 10, 2016 at 19:14
- Yes, I've tried 1. removing member 2. Adding property 3. removing member and property – Sai Commented Oct 10, 2016 at 19:17
- what version of jsdoc? – Daniel A. White Commented Oct 10, 2016 at 19:18
- JS Doc version 2.4.0 – Sai Commented Oct 10, 2016 at 19:19
1 Answer
Reset to default 5I upgraded to Version 3 of JS Doc (https://github./jsdoc3/jsdoc) and this issue was fixed.
See example below:
/**
* Enum for display state.
* @readonly
* @enum {string}
*/
var DisplayState = {
/** @member {string} */
/** The app is running in the foreground and can receive user input. */
foreground: 'foreground',
/** @member {string} */
/** The app is in the background and can't receive user input. */
background: 'background',
/** @member {string} */
/** The app is running in Phone Projection mode (Android Auto or Apple Car Play). */
projected: 'projected'
};