Fix comment

This commit is contained in:
Anders Hejlsberg 2018-02-27 17:34:49 -08:00
parent a0b16fd5d4
commit daf3ed8e22

View File

@ -8225,7 +8225,7 @@ namespace ts {
// conditional type instead of deferring resolution. Also, we always want strict function
// types rules (i.e. proper contravariance) for inferences.
inferTypes(inferences, checkType, extendsType, InferencePriority.NoConstraints | InferencePriority.AlwaysStrict);
// We infer 'never' when there are no candidates for a type parameter
// We infer {} when there are no candidates for a type parameter
const inferredTypes = map(inferences, inference => getTypeFromInference(inference) || emptyObjectType);
combinedMapper = combineTypeMappers(mapper, createTypeMapper(root.inferTypeParameters, inferredTypes));
}