lspeasy / client/src / CancellableRequest
Interface: CancellableRequest<T>
Defined in: packages/client/src/types.ts:127
Return value of LSPClient.sendCancellableRequest.
Remarks
promise rejects with a cancellation error when cancel() is called. Always attach a .catch() handler to promise before calling cancel() to avoid unhandled promise rejections.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The expected response result type. |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
cancel | () => void | Cancels the in-flight request and sends $/cancelRequest to the server. | packages/client/src/types.ts:136 |
promise | Promise<T> | Promise that resolves with the request result or rejects on cancellation. | packages/client/src/types.ts:131 |