File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -9262,11 +9262,12 @@ namespace ts {
9262
9262
// We recursively simplify the object type as it may in turn be an indexed access type. For example, with
9263
9263
// '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type.
9264
9264
const objectType = getSimplifiedType(type.objectType);
9265
+ const indexType = getSimplifiedType(type.indexType);
9265
9266
if (objectType.flags & TypeFlags.Union) {
9266
- return type.simplified = mapType(objectType, t => getIndexedAccessType(t, type. indexType));
9267
+ return type.simplified = mapType(objectType, t => getSimplifiedType( getIndexedAccessType(t, indexType) ));
9267
9268
}
9268
9269
if (objectType.flags & TypeFlags.Intersection) {
9269
- return type.simplified = getIntersectionType(map((objectType as IntersectionType).types, t => getIndexedAccessType(t, type. indexType)));
9270
+ return type.simplified = getIntersectionType(map((objectType as IntersectionType).types, t => getSimplifiedType( getIndexedAccessType(t, indexType) )));
9270
9271
}
9271
9272
// If the object type is a mapped type { [P in K]: E }, where K is generic, instantiate E using a mapper
9272
9273
// that substitutes the index type for P. For example, for an index access { [P in K]: Box<T[P]> }[X], we
You can’t perform that action at this time.
0 commit comments