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:
@ -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';
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user