Add @extends annotations to generated externs
This commit is contained in:
@@ -88,6 +88,9 @@ exports.publish = function(data, opts) {
|
|||||||
stability: doc.api,
|
stability: doc.api,
|
||||||
path: path.join(doc.meta.path, doc.meta.filename)
|
path: path.join(doc.meta.path, doc.meta.filename)
|
||||||
};
|
};
|
||||||
|
if (doc.augments) {
|
||||||
|
symbol.extends = doc.augments[0];
|
||||||
|
}
|
||||||
if (doc.type) {
|
if (doc.type) {
|
||||||
symbol.types = getTypes(doc.type.names);
|
symbol.types = getTypes(doc.type.names);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,9 @@ function generateExterns(typedefs, symbols, externs, interfaces) {
|
|||||||
if (symbol.kind === 'class') {
|
if (symbol.kind === 'class') {
|
||||||
constructors[name] = true;
|
constructors[name] = true;
|
||||||
lines.push(' * @constructor');
|
lines.push(' * @constructor');
|
||||||
|
if (symbol.extends) {
|
||||||
|
lines.push(' * @extends {' + symbol.extends + '}');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (symbol.types) {
|
if (symbol.types) {
|
||||||
lines.push(' * @type {' + noGoogTypes(symbol.types).join('|') + '}');
|
lines.push(' * @type {' + noGoogTypes(symbol.types).join('|') + '}');
|
||||||
|
|||||||
Reference in New Issue
Block a user