diff --git a/extensions/typescript-language-features/src/typescriptServiceClient.ts b/extensions/typescript-language-features/src/typescriptServiceClient.ts index 888532e662f..5ca4fc821be 100644 --- a/extensions/typescript-language-features/src/typescriptServiceClient.ts +++ b/extensions/typescript-language-features/src/typescriptServiceClient.ts @@ -184,9 +184,6 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient private requestQueue: RequestQueue; private callbacks: CallbackMap; - private readonly _onTsServerStarted = new EventEmitter(); - private readonly _onTypesInstallerInitializationFailed = new EventEmitter(); - public readonly telemetryReporter: TelemetryReporter; /** * API version obtained from the version picker after checking the corresponding path exists. @@ -258,15 +255,6 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient this.disposables.push(this.telemetryReporter); } - private _onDiagnosticsReceived = new EventEmitter(); - public get onDiagnosticsReceived(): Event { return this._onDiagnosticsReceived.event; } - - private _onConfigDiagnosticsReceived = new EventEmitter(); - public get onConfigDiagnosticsReceived(): Event { return this._onConfigDiagnosticsReceived.event; } - - private _onResendModelsRequested = new EventEmitter(); - public get onResendModelsRequested(): Event { return this._onResendModelsRequested.event; } - public get configuration() { return this._configuration; } @@ -308,9 +296,17 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient } } - get onTsServerStarted(): Event { - return this._onTsServerStarted.event; - } + private readonly _onTsServerStarted = new EventEmitter(); + public readonly onTsServerStarted = this._onTsServerStarted.event; + + private readonly _onDiagnosticsReceived = new EventEmitter(); + public readonly onDiagnosticsReceived = this._onDiagnosticsReceived.event; + + private readonly _onConfigDiagnosticsReceived = new EventEmitter(); + public readonly onConfigDiagnosticsReceived = this._onConfigDiagnosticsReceived.event; + + private readonly _onResendModelsRequested = new EventEmitter(); + public readonly onResendModelsRequested = this._onResendModelsRequested.event; private readonly _onProjectLanguageServiceStateChanged = new EventEmitter(); public readonly onProjectLanguageServiceStateChanged = this._onProjectLanguageServiceStateChanged.event; @@ -321,9 +317,8 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient private readonly _onDidEndInstallTypings = new EventEmitter(); public readonly onDidEndInstallTypings = this._onDidEndInstallTypings.event; - get onTypesInstallerInitializationFailed(): Event { - return this._onTypesInstallerInitializationFailed.event; - } + private readonly _onTypesInstallerInitializationFailed = new EventEmitter(); + public readonly onTypesInstallerInitializationFailed = this._onTypesInstallerInitializationFailed.event; public get apiVersion(): API { return this._apiVersion;