This commit is contained in:
Nathan Shively-Sanders
2019-06-28 16:09:54 -07:00
parent c48018f95e
commit 97784749b5
2 changed files with 5 additions and 5 deletions

View File

@@ -21658,7 +21658,7 @@ namespace ts {
const related = map(
max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics),
d => typeof d.messageText === 'string' ? (d as DiagnosticMessageChain) : d.messageText);
d => typeof d.messageText === "string" ? (d as DiagnosticMessageChain) : d.messageText);
diagnostics.add(createDiagnosticForNodeFromMessageChain(node, chainDiagnosticMessages(related, Diagnostics.No_overload_matches_this_call)));
}
}

View File

@@ -7201,13 +7201,13 @@ namespace ts {
// }
function compareMessageText(t1: string | DiagnosticMessageChain, t2: string | DiagnosticMessageChain): Comparison {
if (typeof t1 === 'string' && typeof t2 === 'string') {
if (typeof t1 === "string" && typeof t2 === "string") {
return compareStringsCaseSensitive(t1, t2);
}
else if (typeof t1 === 'string') {
else if (typeof t1 === "string") {
return Comparison.LessThan;
}
else if (typeof t2 === 'string') {
else if (typeof t2 === "string") {
return Comparison.GreaterThan;
}
let res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
@@ -7228,7 +7228,7 @@ namespace ts {
return res;
}
for (let i = 0; i < t1.next.length; i++) {
res = compareMessageText(t1.next[i], t2.next[i])
res = compareMessageText(t1.next[i], t2.next[i]);
if (res) {
return res;
}