(type: string | RPCMessageType, ...params: any[])
| 2320 | public sendRequest<R>(method: string, token?: CancellationToken): Thenable<R>; |
| 2321 | public sendRequest<R>(method: string, param: any, token?: CancellationToken): Thenable<R>; |
| 2322 | public sendRequest<R>(type: string | RPCMessageType, ...params: any[]): Thenable<R> { |
| 2323 | if (!this.isConnectionActive()) { |
| 2324 | throw new Error('Language client is not ready yet'); |
| 2325 | } |
| 2326 | this.forceDocumentSync(); |
| 2327 | try { |
| 2328 | return this._resolvedConnection!.sendRequest<R>(type, ...params); |
| 2329 | } catch (error) { |
| 2330 | this.error(`Sending request ${Is.string(type) ? type : type.method} failed.`, error); |
| 2331 | throw error; |
| 2332 | } |
| 2333 | } |
| 2334 | |
| 2335 | public onRequest<R, E, RO>(type: RequestType0<R, E, RO>, handler: RequestHandler0<R, E>): void; |
| 2336 | public onRequest<P, R, E, RO>(type: RequestType<P, R, E, RO>, handler: RequestHandler<P, R, E>): void; |
nothing calls this directly
no test coverage detected