Instantiation of 'keyof T' for wildcard type produces wildcard type
This commit is contained in:
parent
f8a378a1d7
commit
3a61f638ba
1 changed files with 1 additions and 0 deletions
|
@ -7948,6 +7948,7 @@ namespace ts {
|
|||
function getIndexType(type: Type): Type {
|
||||
return maybeTypeOfKind(type, TypeFlags.InstantiableNonPrimitive) ? getIndexTypeForGenericType(<InstantiableType | UnionOrIntersectionType>type) :
|
||||
getObjectFlags(type) & ObjectFlags.Mapped ? getConstraintTypeFromMappedType(<MappedType>type) :
|
||||
type === wildcardType ? wildcardType :
|
||||
type.flags & TypeFlags.Any || getIndexInfoOfType(type, IndexKind.String) ? stringType :
|
||||
getLiteralTypeFromPropertyNames(type);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue