fix(typings): test our .d.ts with --noImplicitAny

This matches how DefinitelyTyped tests it, so we are
one step closer to publishing the same file we generate.

See #3195
This commit is contained in:
Alex Eagle
2015-07-23 09:03:39 +01:00
parent 345fa521dd
commit 19d8b221b4
12 changed files with 26 additions and 26 deletions

View File

@ -38,19 +38,17 @@ module.exports = function getExportDocType(log) {
file: ts.getSourceFileOfNode(symbol.declarations[0]).fileName
});
return 'unknown';
}
};
function getBlockScopedVariableDocType(symbol) {
var node = symbol.valueDeclaration;
while(node) {
if ( node.flags & 0x2000 /* const */) {
// DefinitelyTyped is still TS 1.4 so const is not allowed.
// https://github.com/borisyankov/DefinitelyTyped/issues/4564
return 'var'; // change to const when targetting TS 1.5
return 'const';
}
node = node.parent;
}
return 'let';
}
};
};