mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Always report unmeasurable variance for mapped types
This commit is contained in:
parent
6aad28f174
commit
33d819ff37
@ -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)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user