Use goog.* types in externs
To have an externs file as accurate as possible, we also need to use types that are provided by the Closure library.
This commit is contained in:
@@ -22,14 +22,6 @@ exports.publish = function(data, opts) {
|
||||
return types;
|
||||
}
|
||||
|
||||
function replaceUnknownTypes(item) {
|
||||
item.types.forEach(function(type, index) {
|
||||
if (!(type in names)) {
|
||||
item.types[index] = '*';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// get all doclets with the "api" property or define (excluding events) or
|
||||
// with olx namespace
|
||||
var classes = {};
|
||||
@@ -168,16 +160,7 @@ exports.publish = function(data, opts) {
|
||||
});
|
||||
|
||||
base = base.filter(function(symbol) {
|
||||
var pass = symbol.name in augments || symbol.virtual;
|
||||
if (pass) {
|
||||
if (symbol.params) {
|
||||
symbol.params.forEach(replaceUnknownTypes);
|
||||
}
|
||||
if (symbol.returns) {
|
||||
symbol.returns.forEach(replaceUnknownTypes);
|
||||
}
|
||||
}
|
||||
return pass;
|
||||
return (symbol.name in augments || symbol.virtual);
|
||||
});
|
||||
|
||||
process.stdout.write(
|
||||
|
||||
Reference in New Issue
Block a user