mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 20:45:51 -05:00
Always report unmeasurable variance for mapped types
This commit is contained in:
@@ -19978,7 +19978,7 @@ namespace ts {
|
||||
if (modifiersRelated) {
|
||||
let result: Ternary;
|
||||
const targetConstraint = getConstraintTypeFromMappedType(target);
|
||||
const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMapper : reportUnreliableMapper);
|
||||
const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), reportUnmeasurableMapper);
|
||||
if (result = isRelatedTo(targetConstraint, sourceConstraint, RecursionFlags.Both, reportErrors)) {
|
||||
const mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
|
||||
if (instantiateType(getNameTypeFromMappedType(source), mapper) === instantiateType(getNameTypeFromMappedType(target), mapper)) {
|
||||
|
||||
Reference in New Issue
Block a user