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 228f423 commit 3230804Copy full SHA for 3230804
src/compiler/checker.ts
@@ -6894,7 +6894,7 @@ namespace ts {
6894
// subtype of T but not structurally identical to T. This specifically means that two distinct but
6895
// structurally identical types (such as two classes) are not considered instances of each other.
6896
function isTypeInstanceOf(source: Type, target: Type): boolean {
6897
- return source === target || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
+ return getTargetType(source) === getTargetType(target) || isTypeSubtypeOf(source, target) && !isTypeIdenticalTo(source, target);
6898
}
6899
6900
/**
0 commit comments