fix tsserver.restart not work
This commit is contained in:
parent
8958a6d83c
commit
c4be180558
1 changed files with 3 additions and 7 deletions
|
@ -118,14 +118,10 @@ export default class TsserverService implements IServiceProvider {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public restart(): void {
|
public async restart(): Promise<void> {
|
||||||
if (!this.enable) return
|
if (!this.enable) return
|
||||||
if (this.clientHost) {
|
await this.stop()
|
||||||
let client = this.clientHost.serviceClient
|
await this.start()
|
||||||
client.restartTsServer()
|
|
||||||
} else {
|
|
||||||
void this.start()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async stop(): Promise<void> {
|
public async stop(): Promise<void> {
|
||||||
|
|
Loading…
Reference in a new issue