mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Rename old @property tag to @member.
This commit is contained in:
parent
f37bd95c6c
commit
31161fc9b6
@ -229,7 +229,7 @@ function codetypeToKind(type) {
|
||||
var kind = (type || '').toLowerCase();
|
||||
|
||||
if (kind !== 'function') {
|
||||
return 'property';
|
||||
return 'member';
|
||||
}
|
||||
|
||||
return kind;
|
||||
|
||||
@ -100,7 +100,7 @@ exports.jsdocSchema = {
|
||||
"kind": { // what kind of symbol is this?
|
||||
"type": "string",
|
||||
"maxItems": 1,
|
||||
"enum": ["constructor", "module", "event", "namespace", "method", "property", "enum", "class", "interface", "constant", "mixin", "file", "version"]
|
||||
"enum": ["constructor", "module", "event", "namespace", "method", "member", "enum", "class", "interface", "constant", "mixin", "file", "version"]
|
||||
},
|
||||
"refersto": { // the path to another doc: this doc is simply a renamed alias to that
|
||||
"type": "string",
|
||||
|
||||
@ -292,8 +292,7 @@ exports.defineTags = function(dictionary) {
|
||||
onTagged: function(doclet, tag) {
|
||||
setDocletMemberof(doclet, tag);
|
||||
}
|
||||
})
|
||||
.synonym('member');
|
||||
});
|
||||
|
||||
dictionary.defineTag('mixin', {
|
||||
onTagged: function(doclet, tag) {
|
||||
@ -352,20 +351,22 @@ exports.defineTags = function(dictionary) {
|
||||
dictionary.defineTag('property', {
|
||||
canHaveType: true,
|
||||
onTagged: function(doclet, tag) {
|
||||
if (doclet.kind) {
|
||||
if (!doclet.properties) { doclet.properties = []; }
|
||||
doclet.properties.push(tag.value);
|
||||
}
|
||||
else {
|
||||
setDocletKindToTitle(doclet, tag);
|
||||
setDocletNameToValue(doclet, tag);
|
||||
if (tag.value && tag.value.type) {
|
||||
doclet.type = tag.value.type;
|
||||
}
|
||||
if (!doclet.properties) { doclet.properties = []; }
|
||||
doclet.properties.push(tag.value);
|
||||
}
|
||||
})
|
||||
.synonym('prop');
|
||||
|
||||
dictionary.defineTag('member', {
|
||||
canHaveType: true,
|
||||
onTagged: function(doclet, tag) {
|
||||
setDocletKindToTitle(doclet, tag);
|
||||
setDocletNameToValue(doclet, tag);
|
||||
if (tag.value && tag.value.type) {
|
||||
doclet.type = tag.value.type;
|
||||
}
|
||||
}
|
||||
})
|
||||
.synonym('prop')
|
||||
.synonym('var');
|
||||
|
||||
dictionary.defineTag('protected', {
|
||||
|
||||
@ -96,11 +96,11 @@
|
||||
}
|
||||
|
||||
if (f.scope && f.scope !== 'instance') {
|
||||
if (f.kind == 'function' || f.kind == 'property') attribs.push(f.scope);
|
||||
if (f.kind == 'function' || f.kind == 'member') attribs.push(f.scope);
|
||||
}
|
||||
|
||||
if (f.readonly === true) {
|
||||
if (f.kind == 'property') attribs.push('readonly');
|
||||
if (f.kind == 'member') attribs.push('readonly');
|
||||
}
|
||||
|
||||
f.attribs = '<span class="type-signature">'+htmlsafe(attribs.length? '<'+attribs.join(', ')+'> ' : '')+'</span>';
|
||||
@ -126,7 +126,7 @@
|
||||
addAttribs(doclet);
|
||||
}
|
||||
|
||||
if (doclet.kind === 'property') {
|
||||
if (doclet.kind === 'member') {
|
||||
addSignatureType(doclet);
|
||||
addAttribs(doclet)
|
||||
}
|
||||
@ -156,7 +156,7 @@
|
||||
data.orderBy(['longname', 'version', 'since']);
|
||||
|
||||
// kinds of containers
|
||||
var globals = find( {kind: ['property', 'function'], memberof: {isUndefined: true}} ),
|
||||
var globals = find( {kind: ['member', 'function'], memberof: {isUndefined: true}} ),
|
||||
modules = find({kind: 'module'}),
|
||||
externals = find({kind: 'external'}),
|
||||
mixins = find({kind: 'mixin'}),
|
||||
@ -262,7 +262,7 @@
|
||||
nav = nav + '</ul>';
|
||||
}
|
||||
|
||||
var globalNames = find({kind: ['property', 'function'], 'memberof': {'isUndefined': true}});
|
||||
var globalNames = find({kind: ['member', 'function'], 'memberof': {'isUndefined': true}});
|
||||
|
||||
if (globalNames.length) {
|
||||
nav = nav + '<h3>Global</h3><ul>';
|
||||
|
||||
@ -154,18 +154,18 @@
|
||||
<?js } ?>
|
||||
|
||||
<?js
|
||||
var properties = find({kind: 'property', memberof: doc.longname});
|
||||
var members = find({kind: 'member', memberof: doc.longname});
|
||||
if (title === 'Globals') {
|
||||
properties = find({kind: 'property', memberof: {isUndefined: true}});
|
||||
members = find({kind: 'member', memberof: {isUndefined: true}});
|
||||
}
|
||||
if (properties && properties.length && properties.forEach) {
|
||||
if (members && members.length && members.forEach) {
|
||||
?>
|
||||
|
||||
<h3 class="subsection-title">Properties</h3>
|
||||
<h3 class="subsection-title">Members</h3>
|
||||
|
||||
<dl><?js
|
||||
properties.forEach(function(p) {
|
||||
print(render('properties.tmpl', p));
|
||||
members.forEach(function(p) {
|
||||
print(render('members.tmpl', p));
|
||||
});
|
||||
?></dl>
|
||||
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
|
||||
<dt id="property:<?js= longname ?>">
|
||||
<h4 class="name"><?js= this.attribs + name + this.signature ?></h4>
|
||||
|
||||
<?js if (this.summary) { ?>
|
||||
<p class="summary"><?js= summary ?></p>
|
||||
<?js } ?>
|
||||
</dt>
|
||||
<dd>
|
||||
<?js if (this.description) { ?>
|
||||
<p class="description">
|
||||
<?js= this.description ?>
|
||||
</p>
|
||||
<?js } ?>
|
||||
|
||||
<?js print(render('details.tmpl', this)); ?>
|
||||
|
||||
<?js
|
||||
if (this.examples && examples.length) {
|
||||
print('<h5>Example' + (examples.length > 1? 's':'') + '</h5>');
|
||||
print( render('examples.tmpl', examples) );
|
||||
}
|
||||
?>
|
||||
</dd>
|
||||
@ -1,9 +1,9 @@
|
||||
/** @constructor
|
||||
@member mathlib
|
||||
@memberof mathlib
|
||||
*/
|
||||
function Data() {
|
||||
|
||||
/** @property */
|
||||
/** @member */
|
||||
this.point = {};
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ chat["#channel"] = {};
|
||||
|
||||
|
||||
/**
|
||||
@property
|
||||
@member
|
||||
@type {boolean}
|
||||
@defaultvalue
|
||||
*/
|
||||
|
||||
@ -12,6 +12,6 @@ module.exports = require('connect').createServer(
|
||||
);
|
||||
|
||||
/**
|
||||
@property {number} module:blog/server.port
|
||||
@member {number} module:blog/server.port
|
||||
@default 8080
|
||||
*/
|
||||
Loading…
x
Reference in New Issue
Block a user