Skip to content

Commit d347d87

Browse files
committed
Fix check in isMappedTypeGenericIndexedAccess
1 parent 9031497 commit d347d87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12308,7 +12308,7 @@ namespace ts {
1230812308
let objectType;
1230912309
return !!(type.flags & TypeFlags.IndexedAccess && getObjectFlags(objectType = (type as IndexedAccessType).objectType) & ObjectFlags.Mapped &&
1231012310
!isGenericMappedType(objectType) && isGenericIndexType((type as IndexedAccessType).indexType) &&
12311-
!(objectType as MappedType).declaration.questionToken && !(objectType as MappedType).declaration.nameType);
12311+
!(getMappedTypeModifiers(objectType as MappedType) & MappedTypeModifiers.ExcludeOptional) && !(objectType as MappedType).declaration.nameType);
1231212312
}
1231312313

1231412314
/**

0 commit comments

Comments
 (0)