Merge pull request #15518 from vkurchatkin/empty-property

Allow indexed access to empty property
This commit is contained in:
Mohamed Hegazy
2017-05-01 16:37:02 -07:00
committed by GitHub
4 changed files with 8 additions and 4 deletions

View File

@@ -7257,7 +7257,7 @@ namespace ts {
accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, /*reportError*/ false) ?
getPropertyNameForKnownSymbolName((<Identifier>(<PropertyAccessExpression>accessExpression.argumentExpression).name).text) :
undefined;
if (propName) {
if (propName !== undefined) {
const prop = getPropertyOfType(objectType, propName);
if (prop) {
if (accessExpression) {