mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Signal that TS Server has loaded succesfully when any error event is received
A successful error computation more or less signals that the server is ready and is more reliable than waiting for the projectUpdatedInBackground signal
This commit is contained in:
parent
5518b862e6
commit
e20fdf9545
|
@ -601,6 +601,12 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
case 'syntaxDiag':
|
||||
case 'semanticDiag':
|
||||
case 'suggestionDiag':
|
||||
// This event also roughly signals that project has been loaded successfully
|
||||
if (this._tsServerLoading) {
|
||||
this._tsServerLoading.resolve();
|
||||
this._tsServerLoading = undefined;
|
||||
}
|
||||
|
||||
const diagnosticEvent: Proto.DiagnosticEvent = event;
|
||||
if (diagnosticEvent.body && diagnosticEvent.body.diagnostics) {
|
||||
this._onDiagnosticsReceived.fire({
|
||||
|
@ -632,12 +638,6 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
const resources = body.openFiles.map(vscode.Uri.file);
|
||||
this.bufferSyncSupport.getErr(resources);
|
||||
}
|
||||
|
||||
// This event also roughly signals that project has been loaded successfully
|
||||
if (this._tsServerLoading) {
|
||||
this._tsServerLoading.resolve();
|
||||
this._tsServerLoading = undefined;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'beginInstallTypes':
|
||||
|
|
Loading…
Reference in a new issue