mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-14 07:02:44 -05:00
Fix check in isMappedTypeGenericIndexedAccess (#49341)
* Fix check in isMappedTypeGenericIndexedAccess * Add regression tests
This commit is contained in:
@@ -12308,7 +12308,7 @@ namespace ts {
|
||||
let objectType;
|
||||
return !!(type.flags & TypeFlags.IndexedAccess && getObjectFlags(objectType = (type as IndexedAccessType).objectType) & ObjectFlags.Mapped &&
|
||||
!isGenericMappedType(objectType) && isGenericIndexType((type as IndexedAccessType).indexType) &&
|
||||
!(objectType as MappedType).declaration.questionToken && !(objectType as MappedType).declaration.nameType);
|
||||
!(getMappedTypeModifiers(objectType as MappedType) & MappedTypeModifiers.ExcludeOptional) && !(objectType as MappedType).declaration.nameType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user