提交 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
break;
case 'projectLanguageServiceState':
if (event.body) {
this._onProjectLanguageServiceStateChanged.fire((event as Proto.ProjectLanguageServiceStateEvent).body);
}
break;
case 'projectsUpdatedInBackground':
if (event.body) {
const body = (event as Proto.ProjectsUpdatedInBackgroundEvent).body;
const resources = body.openFiles.map(vscode.Uri.file);
this.bufferSyncSupport.getErr(resources);
}
break;
case 'beginInstallTypes':
if (event.body) {
this._onDidBeginInstallTypings.fire((event as Proto.BeginInstallTypesEvent).body);
}
break;
case 'endInstallTypes':
if (event.body) {
this._onDidEndInstallTypings.fire((event as Proto.EndInstallTypesEvent).body);
}
break;
case 'typesInstallerInitializationFailed':
if (event.body) {
this._onTypesInstallerInitializationFailed.fire((event as Proto.TypesInstallerInitializationFailedEvent).body);
}
break;
case 'surveyReady':
if (event.body) {
this._onSurveyReady.fire((event as Proto.SurveyReadyEvent).body);
}
break;
case 'projectLoadingStart':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册