Skip to content

Commit ff6ceb5

Browse files
committed
Speed up inference expression for completion
1 parent 1f40c2c commit ff6ceb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16119,7 +16119,7 @@ namespace ts {
1611916119
if (constraint) {
1612016120
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
1612116121
const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
16122-
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
16122+
if (!inferredType || isCompletionContext || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
1612316123
inference.inferredType = inferredType = instantiatedConstraint;
1612416124
}
1612516125
}

0 commit comments

Comments
 (0)