keyof T is a literal contextual type

This commit is contained in:
Anders Hejlsberg 2016-11-23 18:22:57 -08:00
parent e128add54e
commit cdda5dfd61

View File

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