提交 26cd6466 编写于 作者: M Matt Bierner

Remove unnessisary conditional

The body of these specific events are always non-null
上级 277b9632
...@@ -619,41 +619,29 @@ export default class TypeScriptServiceClient extends Disposable implements IType ...@@ -619,41 +619,29 @@ export default class TypeScriptServiceClient extends Disposable implements IType
break; break;
case 'projectLanguageServiceState': case 'projectLanguageServiceState':
if (event.body) { this._onProjectLanguageServiceStateChanged.fire((event as Proto.ProjectLanguageServiceStateEvent).body);
this._onProjectLanguageServiceStateChanged.fire((event as Proto.ProjectLanguageServiceStateEvent).body);
}
break; break;
case 'projectsUpdatedInBackground': case 'projectsUpdatedInBackground':
if (event.body) { const body = (event as Proto.ProjectsUpdatedInBackgroundEvent).body;
const body = (event as Proto.ProjectsUpdatedInBackgroundEvent).body; const resources = body.openFiles.map(vscode.Uri.file);
const resources = body.openFiles.map(vscode.Uri.file); this.bufferSyncSupport.getErr(resources);
this.bufferSyncSupport.getErr(resources);
}
break; break;
case 'beginInstallTypes': case 'beginInstallTypes':
if (event.body) { this._onDidBeginInstallTypings.fire((event as Proto.BeginInstallTypesEvent).body);
this._onDidBeginInstallTypings.fire((event as Proto.BeginInstallTypesEvent).body);
}
break; break;
case 'endInstallTypes': case 'endInstallTypes':
if (event.body) { this._onDidEndInstallTypings.fire((event as Proto.EndInstallTypesEvent).body);
this._onDidEndInstallTypings.fire((event as Proto.EndInstallTypesEvent).body);
}
break; break;
case 'typesInstallerInitializationFailed': case 'typesInstallerInitializationFailed':
if (event.body) { this._onTypesInstallerInitializationFailed.fire((event as Proto.TypesInstallerInitializationFailedEvent).body);
this._onTypesInstallerInitializationFailed.fire((event as Proto.TypesInstallerInitializationFailedEvent).body);
}
break; break;
case 'surveyReady': case 'surveyReady':
if (event.body) { this._onSurveyReady.fire((event as Proto.SurveyReadyEvent).body);
this._onSurveyReady.fire((event as Proto.SurveyReadyEvent).body);
}
break; break;
case 'projectLoadingStart': case 'projectLoadingStart':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册