mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Use an explicit type
This commit is contained in:
@@ -689,7 +689,7 @@ namespace ts.server {
|
||||
this.logErrorWorker(err, cmd);
|
||||
}
|
||||
|
||||
private logErrorWorker(err: Error, cmd: string, fileRequest?: protocol.FileRequestArgs): void {
|
||||
private logErrorWorker(err: Error & PossibleProgramFileInfo, cmd: string, fileRequest?: protocol.FileRequestArgs): void {
|
||||
let msg = "Exception on executing command " + cmd;
|
||||
if (err.message) {
|
||||
msg += ":\n" + indent(err.message);
|
||||
@@ -711,8 +711,9 @@ namespace ts.server {
|
||||
catch { } // tslint:disable-line no-empty
|
||||
}
|
||||
|
||||
if (err.hasOwnProperty("ProgramFiles")) {
|
||||
msg += `\n\nProgram files: {(err as any)["ProgramFiles"]}\n`;
|
||||
|
||||
if (err.ProgramFiles) {
|
||||
msg += `\n\nProgram files: {JSON.stringify(error.ProgramFiles}}\n`;
|
||||
msg += `\n\nProjects::\n`;
|
||||
let counter = 0;
|
||||
const addProjectInfo = (project: Project) => {
|
||||
|
||||
Reference in New Issue
Block a user