Skip to content

Commit 342f700

Browse files
committed
Resolve apparent mapped types recursively
1 parent 55153b0 commit 342f700

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14558,9 +14558,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
1455814558
constraint = getConstraintOfTypeParameter(typeVariable);
1455914559
}
1456014560
else {
14561-
const modifiersConstraint = getConstraintOfType(getModifiersTypeFromMappedType(type));
14562-
if (modifiersConstraint) {
14563-
constraint = getApparentType(modifiersConstraint);
14561+
const modifiersType = getModifiersTypeFromMappedType(type);
14562+
if (modifiersType) {
14563+
constraint = getApparentType(getConstraintOfType(modifiersType) || modifiersType);
1456414564
}
1456514565
}
1456614566
if (constraint && everyType(constraint, isArrayOrTupleType)) {

0 commit comments

Comments
 (0)