File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6468,7 +6468,7 @@ namespace ts {
64686468 }
64696469
64706470 function getConstraintOfIndexedAccess(type: IndexedAccessType) {
6471- const transformed = getSimplifiedIndexedAccessType (type);
6471+ const transformed = getSubstitutedIndexedMappedType (type);
64726472 if (transformed) {
64736473 return transformed;
64746474 }
@@ -8383,6 +8383,11 @@ namespace ts {
83838383 getIntersectionType(stringIndexTypes)
83848384 ]);
83858385 }
8386+ return getSubstitutedIndexedMappedType(type);
8387+ }
8388+
8389+ function getSubstitutedIndexedMappedType(type: IndexedAccessType): Type {
8390+ const objectType = type.objectType;
83868391 // If the object type is a mapped type { [P in K]: E }, where K is generic, instantiate E using a mapper
83878392 // that substitutes the index type for P. For example, for an index access { [P in K]: Box<T[P]> }[X], we
83888393 // construct the type Box<T[X]>.
You can’t perform that action at this time.
0 commit comments