mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Merge pull request #7328 from Microsoft/flipSidesInSignatureCheck
flip sides source and target when we check signature relations
This commit is contained in:
@@ -5337,7 +5337,7 @@ namespace ts {
|
||||
for (let i = 0; i < checkCount; i++) {
|
||||
const s = i < sourceMax ? getTypeOfSymbol(sourceParams[i]) : getRestTypeOfSignature(source);
|
||||
const t = i < targetMax ? getTypeOfSymbol(targetParams[i]) : getRestTypeOfSignature(target);
|
||||
const related = compareTypes(t, s, /*reportErrors*/ false) || compareTypes(s, t, reportErrors);
|
||||
const related = compareTypes(s, t, /*reportErrors*/ false) || compareTypes(t, s, reportErrors);
|
||||
if (!related) {
|
||||
if (reportErrors) {
|
||||
errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible,
|
||||
|
||||
Reference in New Issue
Block a user