Skip to content

Commit adf8a54

Browse files
committed
Speed up inference expression for completion
1 parent ba1e478 commit adf8a54

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
@@ -16197,7 +16197,7 @@ namespace ts {
1619716197
if (constraint) {
1619816198
const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper);
1619916199
const isCompletionContext = contextFlags && (contextFlags & ContextFlags.Completion);
16200-
if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType)) || isCompletionContext) {
16200+
if (!inferredType || isCompletionContext || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) {
1620116201
inference.inferredType = inferredType = instantiatedConstraint;
1620216202
}
1620316203
}

0 commit comments

Comments
 (0)