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 efc343a commit b330fbcCopy full SHA for b330fbc
src/compiler/checker.ts
@@ -28163,6 +28163,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
28163
if (type.flags & TypeFlags.AnyOrUnknown) {
28164
return candidate;
28165
}
28166
+
28167
+ // TODO(jakebailey): should this just be type === candidate?
28168
+ if (isTypeIdenticalTo(type, candidate)) {
28169
+ return candidate;
28170
+ }
28171
28172
// We first attempt to filter the current type, narrowing constituents as appropriate and removing
28173
// constituents that are unrelated to the candidate.
28174
const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf;
0 commit comments