Cache & widen assigned js prototype type (#32381)

This commit is contained in:
Wesley Wigham
2019-07-12 12:49:34 -07:00
committed by GitHub
parent 89badcc9d5
commit 37f2e5972f
6 changed files with 237 additions and 1 deletions

View File

@@ -22750,7 +22750,7 @@ namespace ts {
isVariableDeclaration(decl.parent) && getSymbolOfNode(decl.parent));
const prototype = assignmentSymbol && assignmentSymbol.exports && assignmentSymbol.exports.get("prototype" as __String);
const init = prototype && prototype.valueDeclaration && getAssignedJSPrototype(prototype.valueDeclaration);
return init ? checkExpression(init) : undefined;
return init ? getWidenedType(checkExpressionCached(init)) : undefined;
}
function getAssignedJSPrototype(node: Node) {