Strip literal freshness from type queries (#25471)

* Strip literal freshness from type queries

* Rename to fix typo
This commit is contained in:
Wesley Wigham
2018-07-06 13:07:29 -07:00
committed by GitHub
parent ea73ee7fd7
commit 547856a11d
5 changed files with 155 additions and 1 deletions

View File

@@ -8165,7 +8165,7 @@ namespace ts {
// The expression is processed as an identifier expression (section 4.3)
// or property access expression(section 4.10),
// the widened type(section 3.9) of which becomes the result.
links.resolvedType = getWidenedType(checkExpression(node.exprName));
links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(checkExpression(node.exprName)));
}
return links.resolvedType;
}