Simplify the way we annotate observable properties

We no longer add observable annotations to the constructor.
Instead, we just mark getters (and for read/write properties
also setters) with an observable annotation.
This commit is contained in:
Andreas Hocevar
2014-05-03 16:04:25 -04:00
parent 0f072c0ec1
commit 8ee9f7cb6a
18 changed files with 246 additions and 186 deletions

View File

@@ -9,22 +9,7 @@ exports.defineTags = function(dictionary) {
if (parts[0] === 'api') {
doclet.stability = parts.slice(1).join(' ') || 'experimental';
} else if (parts[0] === 'observable') {
if (!doclet.observables) {
doclet.observables = [];
}
var readonly = parts.length > 3 && parts[3] === 'readonly';
var description = (readonly ? parts.slice(4) : parts.slice(3)).join(' ');
doclet.observables.push({
name: parts[1],
type: {
names: tag.value.type.names
},
description: description,
readonly: readonly
});
if (!doclet.fires) {
doclet.fires = [];
}
doclet.observable = '';
}
}
});