mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Members of an @enum no longer require doc comments to appear in the documentation.
This commit is contained in:
parent
1abe982e2f
commit
2351776bdf
@ -318,6 +318,7 @@ function visitNode(node) {
|
||||
if (!parent.doclet.properties) { parent.doclet.properties = []; }
|
||||
// members of an enum inherit the enum's type
|
||||
if (parent.doclet.type && !e.doclet.type) { e.doclet.type = parent.doclet.type; }
|
||||
delete e.doclet.undocumented;
|
||||
parent.doclet.properties.push(e.doclet);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
var TriState = {
|
||||
/** true */
|
||||
TRUE: 1,
|
||||
/** false */
|
||||
FALSE: -1,
|
||||
/** @type {boolean} */
|
||||
MAYBE: true
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
/**
|
||||
* @overview This is a file doclet.
|
||||
* @copyright Michael Mathews 2011
|
||||
*/
|
||||
|
||||
function ignoreMe() {
|
||||
|
||||
@ -12,6 +12,12 @@
|
||||
assert.equal(tristate.properties[0].type.names.join(', '), 'number');
|
||||
});
|
||||
|
||||
test('If no no comment is given for the property it is still included in the enum.', function() {
|
||||
assert.equal(tristate.properties[1].longname, 'TriState.FALSE');
|
||||
assert.equal(typeof tristate.properties[1].undocumented, 'undefined');
|
||||
|
||||
});
|
||||
|
||||
test('If a @type is given for the property it is reflected in the property value.', function() {
|
||||
assert.equal(tristate.properties[2].type.names.join(', '), 'boolean');
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user