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 comment */ /** @member {string} */ And /** @property {string} */ but nothing seems to work
I upgraded to Version 3 of JS Doc (https://github.com/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'
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With