mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Minor style improvements
This commit is contained in:
parent
dfa3dd30fb
commit
b4451b159c
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user