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:
Andreas Hocevar
2014-10-02 00:07:19 +02:00
parent fa30ba29c9
commit 66234a73ba
2 changed files with 5 additions and 30 deletions
+1 -18
View File
@@ -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(