@@ -3378,7 +3378,7 @@ namespace ts {
33783378 }
33793379
33803380 // Return the inferred type for a variable, parameter, or property declaration
3381- function getWidenedTypeForJSSpecialPropertyDeclaration (declaration: Declaration): Type {
3381+ function getTypeForJSSpecialPropertyDeclaration (declaration: Declaration): Type {
33823382 const expression = declaration.kind === SyntaxKind.BinaryExpression ? <BinaryExpression>declaration :
33833383 declaration.kind === SyntaxKind.PropertyAccessExpression ? <BinaryExpression>getAncestor(declaration, SyntaxKind.BinaryExpression) :
33843384 undefined;
@@ -3395,7 +3395,7 @@ namespace ts {
33953395 }
33963396 }
33973397
3398- return getWidenedType( getWidenedLiteralType(checkExpressionCached(expression.right) ));
3398+ return getWidenedLiteralType(checkExpressionCached(expression.right));
33993399 }
34003400
34013401 // Return the type implied by a binding pattern element. This is the type of the initializer of the element if
@@ -3552,7 +3552,7 @@ namespace ts {
35523552 // * className.prototype.method = expr
35533553 if (declaration.kind === SyntaxKind.BinaryExpression ||
35543554 declaration.kind === SyntaxKind.PropertyAccessExpression && declaration.parent.kind === SyntaxKind.BinaryExpression) {
3555- type = getUnionType(map(symbol.declarations, getWidenedTypeForJSSpecialPropertyDeclaration ), /*subtypeReduction*/ true);
3555+ type = getWidenedType( getUnionType(map(symbol.declarations, getTypeForJSSpecialPropertyDeclaration ), /*subtypeReduction*/ true) );
35563556 }
35573557 else {
35583558 type = getWidenedTypeForVariableLikeDeclaration(<VariableLikeDeclaration>declaration, /*reportErrors*/ true);
0 commit comments