fix tsserver.restart not work

This commit is contained in:
Qiming Zhao 2022-03-10 15:43:20 +08:00
parent 8958a6d83c
commit c4be180558
No known key found for this signature in database
GPG key ID: 9722CD0E8D4DCB8C

View file

@ -118,14 +118,10 @@ export default class TsserverService implements IServiceProvider {
})
}
public restart(): void {
public async restart(): Promise<void> {
if (!this.enable) return
if (this.clientHost) {
let client = this.clientHost.serviceClient
client.restartTsServer()
} else {
void this.start()
}
await this.stop()
await this.start()
}
public async stop(): Promise<void> {