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 ba1e478 commit adf8a54Copy full SHA for adf8a54
src/compiler/checker.ts
@@ -16197,7 +16197,7 @@ namespace ts {
16197
if (constraint) {
16198
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
16199
const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
16200
- if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
+ if (!inferredType || isCompletionContext || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
16201
inference.inferredType = inferredType = instantiatedConstraint;
16202
}
16203
0 commit comments