Address CR feedback

This commit is contained in:
Anders Hejlsberg 2018-07-24 17:58:03 -07:00
parent fe9ca725b9
commit ff6059abf6

View File

@ -4372,7 +4372,7 @@ namespace ts {
case TypeSystemPropertyName.ImmediateBaseConstraint:
return !!(<Type>target).immediateBaseConstraint;
}
return Debug.fail("Unhandled TypeSystemPropertyName " + propertyName);
return Debug.assertNever(propertyName);
}
// Pop an entry from the type resolution stack and return its associated result value. The result value will
@ -7879,6 +7879,7 @@ namespace ts {
return inferences && getIntersectionType(inferences);
}
/** This is a worker function. Use getConstraintOfTypeParameter which guards against circular constraints. */
function getConstraintFromTypeParameter(typeParameter: TypeParameter): Type | undefined {
if (!typeParameter.constraint) {
if (typeParameter.target) {