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 1f40c2c commit ff6ceb5Copy full SHA for ff6ceb5
src/compiler/checker.ts
@@ -16119,7 +16119,7 @@ namespace ts {
16119
if (constraint) {
16120
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
16121
const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
16122
- if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
+ if (!inferredType || isCompletionContext || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
16123
inference.inferredType = inferredType = instantiatedConstraint;
16124
}
16125
0 commit comments