mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Minor PR feedback
This commit is contained in:
parent
e426257d8c
commit
d4091554cd
@ -1849,12 +1849,12 @@ namespace ts {
|
||||
comparer(a[key], b[key]);
|
||||
}
|
||||
|
||||
function getDiagnosticFileName(diagnostic: Diagnostic): string {
|
||||
function getDiagnosticFilePath(diagnostic: Diagnostic): string {
|
||||
return diagnostic.file ? diagnostic.file.path : undefined;
|
||||
}
|
||||
|
||||
export function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): Comparison {
|
||||
return compareStringsCaseSensitive(getDiagnosticFileName(d1), getDiagnosticFileName(d2)) ||
|
||||
return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) ||
|
||||
compareValues(d1.start, d2.start) ||
|
||||
compareValues(d1.length, d2.length) ||
|
||||
compareValues(d1.code, d2.code) ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user