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.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> {