Handle all instantiable non-primitive types in homomorphic mapped types

This commit is contained in:
Anders Hejlsberg 2018-02-06 12:27:35 -08:00
parent c4c9a00a9f
commit bb28444f8c

View File

@ -8781,7 +8781,7 @@ namespace ts {
}
function isMappableType(type: Type) {
return type.flags & (TypeFlags.Any | TypeFlags.TypeParameter | TypeFlags.Object | TypeFlags.Intersection | TypeFlags.IndexedAccess);
return type.flags & (TypeFlags.Any | TypeFlags.InstantiableNonPrimitive | TypeFlags.Object | TypeFlags.Intersection);
}
function instantiateAnonymousType(type: AnonymousType, mapper: TypeMapper): AnonymousType {