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 6b6e41e commit 863fc2cCopy full SHA for 863fc2c
src/compiler/checker.ts
@@ -16018,7 +16018,7 @@ namespace ts {
16018
const constraint = getConstraintOfTypeParameter(inference.typeParameter);
16019
if (constraint) {
16020
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
16021
- const isCompletionContext = contextFlags && ((contextFlags | ContextFlags.Completion) === contextFlags);
+ const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
16022
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
16023
inference.inferredType = inferredType = instantiatedConstraint;
16024
}
0 commit comments