Skip to content

Commit 6fd5860

Browse files
committed
move the fix to inferReverseMappedTypeWorker
1 parent 97a061d commit 6fd5860

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26421,7 +26421,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2642126421
function getTypeOfReverseMappedSymbol(symbol: ReverseMappedSymbol): Type {
2642226422
const links = getSymbolLinks(symbol);
2642326423
if (!links.type) {
26424-
links.type = getWidenedType(inferReverseMappedType(symbol.links.propertyType, symbol.links.mappedType, symbol.links.constraintType) || unknownType);
26424+
links.type = inferReverseMappedType(symbol.links.propertyType, symbol.links.mappedType, symbol.links.constraintType) || unknownType;
2642526425
}
2642626426
return links.type;
2642726427
}
@@ -26431,7 +26431,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2643126431
const templateType = getTemplateTypeFromMappedType(target);
2643226432
const inference = createInferenceInfo(typeParameter);
2643326433
inferTypes([inference], sourceType, templateType);
26434-
return getTypeFromInference(inference) || unknownType;
26434+
return getWidenedType(getTypeFromInference(inference) || unknownType);
2643526435
}
2643626436

2643726437
function inferReverseMappedType(source: Type, target: MappedType, constraint: IndexType): Type | undefined {

0 commit comments

Comments
 (0)