fix ServiceStat
This commit is contained in:
parent
4c4842835f
commit
dbf008e4c7
1 changed files with 6 additions and 5 deletions
|
@ -42,17 +42,18 @@ export default class TsserverService implements IServiceProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
public start(): Promise<void> {
|
public start(): Promise<void> {
|
||||||
|
this.state = ServiceStat.Starting
|
||||||
this.clientHost = new TypeScriptServiceClientHost(this.descriptions)
|
this.clientHost = new TypeScriptServiceClientHost(this.descriptions)
|
||||||
this.disposables.push(this.clientHost)
|
this.disposables.push(this.clientHost)
|
||||||
Object.defineProperty(this, 'state', {
|
|
||||||
get: () => {
|
|
||||||
return this.clientHost.serviceClient.state
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let client = this.clientHost.serviceClient
|
let client = this.clientHost.serviceClient
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
let started = false
|
let started = false
|
||||||
client.onTsServerStarted(() => {
|
client.onTsServerStarted(() => {
|
||||||
|
Object.defineProperty(this, 'state', {
|
||||||
|
get: () => {
|
||||||
|
return this.clientHost.serviceClient.state
|
||||||
|
}
|
||||||
|
})
|
||||||
this._onDidServiceReady.fire(void 0)
|
this._onDidServiceReady.fire(void 0)
|
||||||
this.ensureConfiguration() // tslint:disable-line
|
this.ensureConfiguration() // tslint:disable-line
|
||||||
if (!started) {
|
if (!started) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue