mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
fix(45713) Improve error report summaries (#45742)
* Improve error report summaries (#45713) * fixup! Improve error report summaries (#45713) * fixup! fixup! Improve error report summaries (#45713) * Adds support for handling localization renaming the 'files' header due to localization * fixup! Adds support for handling localization renaming the 'files' header due to localization - Fixed baseline error - Fixed linter error Co-authored-by: Orta <git@orta.io> Co-authored-by: Orta Therox <ortam@microsoft.com>
This commit is contained in:
@@ -54,7 +54,7 @@ export function f22() { } // trailing`,
|
||||
/*createProgram*/ undefined,
|
||||
createDiagnosticReporter(sys, /*pretty*/ true),
|
||||
createBuilderStatusReporter(sys, /*pretty*/ true),
|
||||
errorCount => sys.write(getErrorSummaryText(errorCount, sys.newLine))
|
||||
(errorCount, filesInError) => sys.write(getErrorSummaryText(errorCount, filesInError, sys.newLine))
|
||||
);
|
||||
buildHost.afterProgramEmitAndDiagnostics = cb;
|
||||
buildHost.afterEmitBundle = cb;
|
||||
|
||||
@@ -204,13 +204,18 @@ namespace ts.tscWatch {
|
||||
assert.equal(host.exitCode, expectedExitCode);
|
||||
}
|
||||
|
||||
export function checkNormalBuildErrors(host: WatchedSystem, errors: readonly Diagnostic[] | readonly string[], reportErrorSummary?: boolean) {
|
||||
export function checkNormalBuildErrors(
|
||||
host: WatchedSystem,
|
||||
errors: readonly Diagnostic[] | readonly string[],
|
||||
files: readonly ReportFileInError[],
|
||||
reportErrorSummary?: boolean
|
||||
) {
|
||||
checkOutputErrors(
|
||||
host,
|
||||
[
|
||||
...map(errors, hostOutputDiagnostic),
|
||||
...reportErrorSummary ?
|
||||
[hostOutputWatchDiagnostic(getErrorSummaryText(errors.length, host.newLine))] :
|
||||
[hostOutputWatchDiagnostic(getErrorSummaryText(errors.length, files, host.newLine))] :
|
||||
emptyArray
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user