diff --git a/packages/@ngtools/webpack/src/angular_compiler_plugin.ts b/packages/@ngtools/webpack/src/angular_compiler_plugin.ts index 59ba56cbc847..748c963ea30b 100644 --- a/packages/@ngtools/webpack/src/angular_compiler_plugin.ts +++ b/packages/@ngtools/webpack/src/angular_compiler_plugin.ts @@ -760,12 +760,12 @@ export class AngularCompilerPlugin implements Tapable { .filter((diag) => diag.category === ts.DiagnosticCategory.Warning); if (errors.length > 0) { - const message = formatDiagnostics(this._angularCompilerOptions, errors); + const message = formatDiagnostics(errors); this._compilation.errors.push(message); } if (warnings.length > 0) { - const message = formatDiagnostics(this._angularCompilerOptions, warnings); + const message = formatDiagnostics(warnings); this._compilation.warnings.push(message); } diff --git a/packages/@ngtools/webpack/src/ngtools_api.ts b/packages/@ngtools/webpack/src/ngtools_api.ts index ee9df8db3594..84300962336e 100644 --- a/packages/@ngtools/webpack/src/ngtools_api.ts +++ b/packages/@ngtools/webpack/src/ngtools_api.ts @@ -102,7 +102,7 @@ export interface CreateCompilerHostInterface { }): CompilerHost; } export interface FormatDiagnosticsInterface { - (options: CompilerOptions, diags: Diagnostics): string; + (diags: Diagnostics): string; } // Manually check for Compiler CLI availability and supported version. diff --git a/packages/@ngtools/webpack/src/type_checker.ts b/packages/@ngtools/webpack/src/type_checker.ts index ef20fb4f2af4..664de29d7b4a 100644 --- a/packages/@ngtools/webpack/src/type_checker.ts +++ b/packages/@ngtools/webpack/src/type_checker.ts @@ -145,12 +145,12 @@ class TypeChecker { const warnings = allDiagnostics.filter((d) => d.category === ts.DiagnosticCategory.Warning); if (errors.length > 0) { - const message = formatDiagnostics(this._angularCompilerOptions, errors); + const message = formatDiagnostics(errors); console.error(bold(red('ERROR in ' + message))); } if (warnings.length > 0) { - const message = formatDiagnostics(this._angularCompilerOptions, warnings); + const message = formatDiagnostics(warnings); console.log(bold(yellow('WARNING in ' + message))); } }