diff --git a/src/server/index.ts b/src/server/index.ts index 6744848..d1866f6 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -118,14 +118,10 @@ export default class TsserverService implements IServiceProvider { }) } - public restart(): void { + public async restart(): Promise { 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 {