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