Minor style improvements

This commit is contained in:
Nathan Shively-Sanders 2016-10-27 15:38:29 -07:00
parent dfa3dd30fb
commit b4451b159c

View File

@ -11885,7 +11885,8 @@ namespace ts {
// for the argument. In that case, we should check the argument.
if (argType === undefined) {
// If the parameter and argument are both functions and the parameter has fewer arguments than the argument,
// then this signature is not applicable. Exit early.
// then this signature is not applicable. Exit early to avoid fixing incorrect
// contextual types to the function expression parameters.
if (!reportErrors && isAritySmaller(paramType, arg)) {
return false;
}
@ -11916,6 +11917,8 @@ namespace ts {
const sourceLengths = sourceSignatures.map(sig => !sig.hasRestParameter ? sig.parameters.length : Number.MAX_VALUE);
return forEach(sourceLengths, len => len < targetParameterCount);
}
return false;
}
/**