Skip to content

lspeasy / core/src / supportsNotebookDocumentSync

Function: supportsNotebookDocumentSync() ​

ts
function supportsNotebookDocumentSync(capabilities): capabilities is ServerCapabilities & { notebookDocumentSync: NonNullable<NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions | undefined> };

Defined in: packages/core/src/protocol/capabilities.ts:272

Helper to check if notebook document sync is supported by the server.

Parameters ​

ParameterTypeDescription
capabilitiesServerCapabilitiesThe server capabilities to check.

Returns ​

capabilities is ServerCapabilities & { notebookDocumentSync: NonNullable<NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions | undefined> }

true when notebookDocumentSync is declared (not null/undefined).

Released under the MIT License.