Skip to content

Commit c084d28

Browse files
committed
Specifically handle erasedType as a special any in getIndexedAccessType
1 parent ed49594 commit c084d28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13605,6 +13605,9 @@ namespace ts {
1360513605
if (objectType === wildcardType || indexType === wildcardType) {
1360613606
return wildcardType;
1360713607
}
13608+
if (objectType === erasedType || indexType === erasedType) {
13609+
return erasedType;
13610+
}
1360813611
// If the object type has a string index signature and no other members we know that the result will
1360913612
// always be the type of that index signature and we can simplify accordingly.
1361013613
if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & TypeFlags.Nullable) && isTypeAssignableToKind(indexType, TypeFlags.String | TypeFlags.Number)) {

0 commit comments

Comments
 (0)