mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #9750 from Microsoft/fixFormatDiagnostics
use sys based host for formatting diagnostics
This commit is contained in:
1 parent
37d41f9ec0
commit
af0c548312
2 files changed
+31
-15
No files matched your search
@@ -997,7 +997,13 @@ namespace ts {
|
||||
return sortAndDeduplicateDiagnostics(diagnostics);
|
||||
}
|
||||
|
||||
export function formatDiagnostics(diagnostics: Diagnostic[], host: CompilerHost): string {
|
||||
export interface FormatDiagnosticsHost {
|
||||
getCurrentDirectory(): string;
|
||||
getCanonicalFileName(fileName: string): string;
|
||||
getNewLine(): string;
|
||||
}
|
||||
|
||||
export function formatDiagnostics(diagnostics: Diagnostic[], host: FormatDiagnosticsHost): string {
|
||||
let output = "";
|
||||
|
||||
for (const diagnostic of diagnostics) {
|
||||
|
||||
Reference in new issue
Block a user