Convert related spans to message chains

This commit is contained in:
Nathan Shively-Sanders
2019-06-28 15:42:27 -07:00
parent ba9d8e2e81
commit 47bbc9546e
37 changed files with 928 additions and 464 deletions

View File

@@ -21655,8 +21655,10 @@ namespace ts {
i++;
}
const related = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics);
diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(undefined, Diagnostics.No_overload_matches_this_call), related));
const related = map(
max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics),
d => typeof d.messageText === 'string' ? (d as DiagnosticMessageChain) : d.messageText);
diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(related, Diagnostics.No_overload_matches_this_call)));
}
}
else if (candidateForArgumentArityError) {