Walk up the inheritance chain to an exportable constructor
This commit is contained in:
@@ -14,6 +14,9 @@ var path = require('path');
|
|||||||
*/
|
*/
|
||||||
exports.publish = function(data, opts) {
|
exports.publish = function(data, opts) {
|
||||||
|
|
||||||
|
var exportables = {};
|
||||||
|
var classes = {};
|
||||||
|
|
||||||
function getTypes(data) {
|
function getTypes(data) {
|
||||||
var types = [];
|
var types = [];
|
||||||
data.forEach(function(name) {
|
data.forEach(function(name) {
|
||||||
@@ -30,6 +33,9 @@ exports.publish = function(data, opts) {
|
|||||||
{api: {isString: true}},
|
{api: {isString: true}},
|
||||||
{'interface': {is: true}},
|
{'interface': {is: true}},
|
||||||
function() {
|
function() {
|
||||||
|
if (this.kind == 'class') {
|
||||||
|
classes[this.longname] = this;
|
||||||
|
}
|
||||||
return this.meta && (/[\\\/]externs$/).test(this.meta.path);
|
return this.meta && (/[\\\/]externs$/).test(this.meta.path);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -133,6 +139,16 @@ exports.publish = function(data, opts) {
|
|||||||
}
|
}
|
||||||
var target = isExterns ? externs : (doc.interface ? interfaces : symbols);
|
var target = isExterns ? externs : (doc.interface ? interfaces : symbols);
|
||||||
target.push(symbol);
|
target.push(symbol);
|
||||||
|
|
||||||
|
if (symbol.stability && symbol.kind == 'class') {
|
||||||
|
exportables[symbol.name] = true;
|
||||||
|
}
|
||||||
|
if (symbol.extends) {
|
||||||
|
while (!(symbol.extends in exportables) &&
|
||||||
|
symbol.extends in classes && classes[symbol.extends].augments) {
|
||||||
|
symbol.extends = classes[symbol.extends].augments[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user