Fixed an issue with reverse mapped types inference when single type variable is left after inferring from matching types (#55941)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Mateusz Burzyński
2023-11-30 14:57:52 -08:00
committed by GitHub
co-authored by Nathan Shively-Sanders
parent 30f3ce7b51
commit 6edfef8c0d
4 changed files with 380 additions and 1 deletions
+1 -1
View File
@@ -25354,7 +25354,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
target = getIntersectionType(targets);
}
}
else if (target.flags & (TypeFlags.IndexedAccess | TypeFlags.Substitution)) {
if (target.flags & (TypeFlags.IndexedAccess | TypeFlags.Substitution)) {
target = getActualTypeVariable(target);
}
if (target.flags & TypeFlags.TypeVariable) {