mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
code review comments
This commit is contained in:
parent
8f7fd0918b
commit
41dbae58f3
@ -9598,7 +9598,7 @@ namespace ts {
|
||||
getInferenceMapper(context)));
|
||||
}
|
||||
else {
|
||||
inferredType = emptyObjectType;
|
||||
inferredType = context.useAnyForNoInferences ? anyType : emptyObjectType;
|
||||
}
|
||||
|
||||
inferenceSucceeded = true;
|
||||
@ -9614,9 +9614,6 @@ namespace ts {
|
||||
context.inferredTypes[index] = inferredType = instantiatedConstraint;
|
||||
}
|
||||
}
|
||||
if (context.useAnyForNoInferences && !inferences.length && inferredType === emptyObjectType) {
|
||||
context.inferredTypes[index] = inferredType = anyType;
|
||||
}
|
||||
}
|
||||
else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) {
|
||||
// If inference failed, it is necessary to record the index of the failed type parameter (the one we are on).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user