Skip to content

lspeasy / client/src / CancellableRequest

Interface: CancellableRequest<T> ​

Defined in: packages/client/src/types.ts:158

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 ParameterDescription
TThe expected response result type.

Properties ​

PropertyTypeDescriptionDefined in
cancel() => voidCancels the in-flight request and sends $/cancelRequest to the server.packages/client/src/types.ts:167
promisePromise<T>Promise that resolves with the request result or rejects on cancellation.packages/client/src/types.ts:162

Released under the MIT License.