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.clientHost) {
|
||||
let client = this.clientHost.serviceClient
|
||||
client.restartTsServer()
|
||||
} else {
|
||||
void this.start()
|
||||
}
|
||||
await this.stop()
|
||||
await this.start()
|
||||
}
|
||||
|
||||
public async stop(): Promise<void> {
|
||||
|
|
Loading…
Reference in a new issue