We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebbb3a4 commit 5bb8d2aCopy full SHA for 5bb8d2a
src/compiler/checker.ts
@@ -11029,7 +11029,9 @@ namespace ts {
11029
const templateType = getTemplateTypeFromMappedType(target);
11030
const inference = createInferenceInfo(typeParameter);
11031
inferTypes([inference], sourceType, templateType);
11032
- return inference.candidates ? getUnionType(inference.candidates, UnionReduction.Subtype) : emptyObjectType;
+ return inference.candidates ? getUnionType(inference.candidates, UnionReduction.Subtype) :
11033
+ inference.contraCandidates ? getCommonSubtype(inference.contraCandidates) :
11034
+ emptyObjectType;
11035
}
11036
11037
function getUnmatchedProperty(source: Type, target: Type, requireOptionalProperties: boolean) {
0 commit comments