mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 03:09:39 -06:00
Was actually needed
This commit is contained in:
parent
ba8ae71998
commit
dd2d1c5e6b
@ -22206,6 +22206,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (target.flags & TypeFlags.TypeParameter && (target as TypeParameter).isThisType) {
|
||||
const constraint = getConstraintOfTypeParameter(target as TypeParameter);
|
||||
if (constraint && isTypeRelatedTo(source, constraint, relation)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (source.flags & TypeFlags.Object && target.flags & TypeFlags.Object) {
|
||||
const related = relation.get(getRelationKey(source, target, IntersectionState.None, relation, /*ignoreConstraints*/ false));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user