* Registers a handler for LSP requests from the server. * * Some LSP servers send requests TO the client (reverse direction). * This allows registering handlers for such requests. * * @param method - LSP request method (e.g., 'workspace/configuration') * @param handler - Callback f
(
method: string,
handler: (params: TParams) => TResult | Promise<TResult>,
)
| 459 | * @param handler - Callback function to handle the request and return a response |
| 460 | */ |
| 461 | function onRequest<TParams, TResult>( |
| 462 | method: string, |
| 463 | handler: (params: TParams) => TResult | Promise<TResult>, |
| 464 | ): void { |
| 465 | client.onRequest(method, handler) |
| 466 | } |
| 467 | |
| 468 | // Return public API |
| 469 | return { |
nothing calls this directly
no outgoing calls
no test coverage detected