keyof T is a literal contextual type

This commit is contained in:
Anders Hejlsberg 2016-11-23 18:22:57 -08:00 committed by Daniel Rosenwasser
parent 47c14fc907
commit 17459aade0

View File

@ -14870,7 +14870,7 @@ namespace ts {
}
contextualType = apparentType;
}
return maybeTypeOfKind(contextualType, TypeFlags.Literal);
return maybeTypeOfKind(contextualType, (TypeFlags.Literal | TypeFlags.Index));
}
return false;
}