@depup/vscode-languageserver-protocol 3.18.3-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/License.txt +11 -0
  2. package/README.md +25 -0
  3. package/changes.json +5 -0
  4. package/eslint.config.js +13 -0
  5. package/lib/browser/main.d.ts +4 -0
  6. package/lib/browser/main.js +27 -0
  7. package/lib/common/api.d.ts +58 -0
  8. package/lib/common/api.js +77 -0
  9. package/lib/common/connection.d.ts +187 -0
  10. package/lib/common/connection.js +14 -0
  11. package/lib/common/messages.d.ts +58 -0
  12. package/lib/common/messages.js +81 -0
  13. package/lib/common/protocol.$.d.ts +1 -0
  14. package/lib/common/protocol.$.js +43 -0
  15. package/lib/common/protocol.callHierarchy.d.ts +89 -0
  16. package/lib/common/protocol.callHierarchy.js +45 -0
  17. package/lib/common/protocol.colorProvider.d.ts +68 -0
  18. package/lib/common/protocol.colorProvider.js +34 -0
  19. package/lib/common/protocol.configuration.d.ts +36 -0
  20. package/lib/common/protocol.configuration.js +25 -0
  21. package/lib/common/protocol.d.ts +3626 -0
  22. package/lib/common/protocol.declaration.d.ts +38 -0
  23. package/lib/common/protocol.declaration.js +23 -0
  24. package/lib/common/protocol.diagnostic.d.ts +369 -0
  25. package/lib/common/protocol.diagnostic.js +111 -0
  26. package/lib/common/protocol.fileOperations.d.ts +312 -0
  27. package/lib/common/protocol.fileOperations.js +107 -0
  28. package/lib/common/protocol.foldingRange.d.ts +118 -0
  29. package/lib/common/protocol.foldingRange.js +33 -0
  30. package/lib/common/protocol.implementation.d.ts +39 -0
  31. package/lib/common/protocol.implementation.js +22 -0
  32. package/lib/common/protocol.inlayHint.d.ts +117 -0
  33. package/lib/common/protocol.inlayHint.js +46 -0
  34. package/lib/common/protocol.inlineCompletion.d.ts +53 -0
  35. package/lib/common/protocol.inlineCompletion.js +22 -0
  36. package/lib/common/protocol.inlineValue.d.ts +88 -0
  37. package/lib/common/protocol.inlineValue.js +32 -0
  38. package/lib/common/protocol.js +1031 -0
  39. package/lib/common/protocol.linkedEditingRange.d.ts +53 -0
  40. package/lib/common/protocol.linkedEditingRange.js +20 -0
  41. package/lib/common/protocol.moniker.d.ts +107 -0
  42. package/lib/common/protocol.moniker.js +69 -0
  43. package/lib/common/protocol.notebook.d.ts +428 -0
  44. package/lib/common/protocol.notebook.js +247 -0
  45. package/lib/common/protocol.progress.d.ts +108 -0
  46. package/lib/common/protocol.progress.js +38 -0
  47. package/lib/common/protocol.selectionRange.d.ts +42 -0
  48. package/lib/common/protocol.selectionRange.js +21 -0
  49. package/lib/common/protocol.semanticTokens.d.ts +241 -0
  50. package/lib/common/protocol.semanticTokens.js +61 -0
  51. package/lib/common/protocol.showDocument.d.ts +73 -0
  52. package/lib/common/protocol.showDocument.js +23 -0
  53. package/lib/common/protocol.textDocumentContent.d.ts +93 -0
  54. package/lib/common/protocol.textDocumentContent.js +33 -0
  55. package/lib/common/protocol.typeDefinition.d.ts +39 -0
  56. package/lib/common/protocol.typeDefinition.js +22 -0
  57. package/lib/common/protocol.typeHierarchy.d.ts +84 -0
  58. package/lib/common/protocol.typeHierarchy.js +43 -0
  59. package/lib/common/protocol.workspaceFolder.d.ts +76 -0
  60. package/lib/common/protocol.workspaceFolder.js +29 -0
  61. package/lib/common/utils/is.d.ts +9 -0
  62. package/lib/common/utils/is.js +45 -0
  63. package/lib/node/main.d.ts +5 -0
  64. package/lib/node/main.js +27 -0
  65. package/metaModel.schema.json +864 -0
  66. package/package.json +68 -0
  67. package/thirdpartynotices.txt +31 -0
@@ -0,0 +1,53 @@
1
+ import { RequestHandler } from 'vscode-jsonrpc';
2
+ import { Range } from 'vscode-languageserver-types';
3
+ import { CM, MessageDirection, ProtocolRequestType } from './messages';
4
+ import { type StaticRegistrationOptions, type TextDocumentPositionParams, type TextDocumentRegistrationOptions, type WorkDoneProgressOptions, type WorkDoneProgressParams } from './protocol';
5
+ /**
6
+ * Client capabilities for the linked editing range request.
7
+ *
8
+ * @since 3.16.0
9
+ */
10
+ export interface LinkedEditingRangeClientCapabilities {
11
+ /**
12
+ * Whether implementation supports dynamic registration. If this is set to `true`
13
+ * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
14
+ * return value for the corresponding server capability as well.
15
+ */
16
+ dynamicRegistration?: boolean;
17
+ }
18
+ export interface LinkedEditingRangeParams extends TextDocumentPositionParams, WorkDoneProgressParams {
19
+ }
20
+ export interface LinkedEditingRangeOptions extends WorkDoneProgressOptions {
21
+ }
22
+ export interface LinkedEditingRangeRegistrationOptions extends TextDocumentRegistrationOptions, LinkedEditingRangeOptions, StaticRegistrationOptions {
23
+ }
24
+ /**
25
+ * The result of a linked editing range request.
26
+ *
27
+ * @since 3.16.0
28
+ */
29
+ export interface LinkedEditingRanges {
30
+ /**
31
+ * A list of ranges that can be edited together. The ranges must have
32
+ * identical length and contain identical text content. The ranges cannot overlap.
33
+ */
34
+ ranges: Range[];
35
+ /**
36
+ * An optional word pattern (regular expression) that describes valid contents for
37
+ * the given ranges. If no pattern is provided, the client configuration's word
38
+ * pattern will be used.
39
+ */
40
+ wordPattern?: string;
41
+ }
42
+ /**
43
+ * A request to provide ranges that can be edited together.
44
+ *
45
+ * @since 3.16.0
46
+ */
47
+ export declare namespace LinkedEditingRangeRequest {
48
+ const method: 'textDocument/linkedEditingRange';
49
+ const messageDirection: MessageDirection;
50
+ const type: ProtocolRequestType<LinkedEditingRangeParams, LinkedEditingRanges | null, void, void, LinkedEditingRangeRegistrationOptions>;
51
+ type HandlerSignature = RequestHandler<LinkedEditingRangeParams, LinkedEditingRanges | null, void>;
52
+ const capabilities: CM<"textDocument.linkedEditingRange", "linkedEditingRangeProvider">;
53
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License. See License.txt in the project root for license information.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.LinkedEditingRangeRequest = void 0;
8
+ const messages_1 = require("./messages");
9
+ /**
10
+ * A request to provide ranges that can be edited together.
11
+ *
12
+ * @since 3.16.0
13
+ */
14
+ var LinkedEditingRangeRequest;
15
+ (function (LinkedEditingRangeRequest) {
16
+ LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';
17
+ LinkedEditingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
18
+ LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);
19
+ LinkedEditingRangeRequest.capabilities = messages_1.CM.create('textDocument.linkedEditingRange', 'linkedEditingRangeProvider');
20
+ })(LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = LinkedEditingRangeRequest = {}));
@@ -0,0 +1,107 @@
1
+ import { MessageDirection, ProtocolRequestType, CM } from './messages';
2
+ import { type WorkDoneProgressOptions, type WorkDoneProgressParams, type PartialResultParams, type TextDocumentRegistrationOptions, type TextDocumentPositionParams } from './protocol';
3
+ /**
4
+ * Moniker uniqueness level to define scope of the moniker.
5
+ *
6
+ * @since 3.16.0
7
+ */
8
+ export declare namespace UniquenessLevel {
9
+ /**
10
+ * The moniker is only unique inside a document
11
+ */
12
+ const document = "document";
13
+ /**
14
+ * The moniker is unique inside a project for which a dump got created
15
+ */
16
+ const project = "project";
17
+ /**
18
+ * The moniker is unique inside the group to which a project belongs
19
+ */
20
+ const group = "group";
21
+ /**
22
+ * The moniker is unique inside the moniker scheme.
23
+ */
24
+ const scheme = "scheme";
25
+ /**
26
+ * The moniker is globally unique
27
+ */
28
+ const global = "global";
29
+ }
30
+ export type UniquenessLevel = 'document' | 'project' | 'group' | 'scheme' | 'global';
31
+ /**
32
+ * The moniker kind.
33
+ *
34
+ * @since 3.16.0
35
+ */
36
+ export declare namespace MonikerKind {
37
+ /**
38
+ * The moniker represent a symbol that is imported into a project
39
+ */
40
+ const $import = "import";
41
+ /**
42
+ * The moniker represents a symbol that is exported from a project
43
+ */
44
+ const $export = "export";
45
+ /**
46
+ * The moniker represents a symbol that is local to a project (e.g. a local
47
+ * variable of a function, a class not visible outside the project, ...)
48
+ */
49
+ const local = "local";
50
+ }
51
+ export type MonikerKind = 'import' | 'export' | 'local';
52
+ /**
53
+ * Moniker definition to match LSIF 0.5 moniker definition.
54
+ *
55
+ * @since 3.16.0
56
+ */
57
+ export interface Moniker {
58
+ /**
59
+ * The scheme of the moniker. For example tsc or .Net
60
+ */
61
+ scheme: string;
62
+ /**
63
+ * The identifier of the moniker. The value is opaque in LSIF however
64
+ * schema owners are allowed to define the structure if they want.
65
+ */
66
+ identifier: string;
67
+ /**
68
+ * The scope in which the moniker is unique
69
+ */
70
+ unique: UniquenessLevel;
71
+ /**
72
+ * The moniker kind if known.
73
+ */
74
+ kind?: MonikerKind;
75
+ }
76
+ /**
77
+ * Client capabilities specific to the moniker request.
78
+ *
79
+ * @since 3.16.0
80
+ */
81
+ export interface MonikerClientCapabilities {
82
+ /**
83
+ * Whether moniker supports dynamic registration. If this is set to `true`
84
+ * the client supports the new `MonikerRegistrationOptions` return value
85
+ * for the corresponding server capability as well.
86
+ */
87
+ dynamicRegistration?: boolean;
88
+ }
89
+ export interface MonikerServerCapabilities {
90
+ }
91
+ export interface MonikerOptions extends WorkDoneProgressOptions {
92
+ }
93
+ export interface MonikerRegistrationOptions extends TextDocumentRegistrationOptions, MonikerOptions {
94
+ }
95
+ export interface MonikerParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams {
96
+ }
97
+ /**
98
+ * A request to get the moniker of a symbol at a given text document position.
99
+ * The request parameter is of type {@link TextDocumentPositionParams}.
100
+ * The response is of type {@link Moniker Moniker[]} or `null`.
101
+ */
102
+ export declare namespace MonikerRequest {
103
+ const method: 'textDocument/moniker';
104
+ const messageDirection: MessageDirection;
105
+ const type: ProtocolRequestType<MonikerParams, Moniker[] | null, Moniker[], void, MonikerRegistrationOptions>;
106
+ const capabilities: CM<"textDocument.moniker", "monikerProvider">;
107
+ }
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ /* --------------------------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License. See License.txt in the project root for license information.
5
+ * ------------------------------------------------------------------------------------------ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0;
8
+ const messages_1 = require("./messages");
9
+ /**
10
+ * Moniker uniqueness level to define scope of the moniker.
11
+ *
12
+ * @since 3.16.0
13
+ */
14
+ var UniquenessLevel;
15
+ (function (UniquenessLevel) {
16
+ /**
17
+ * The moniker is only unique inside a document
18
+ */
19
+ UniquenessLevel.document = 'document';
20
+ /**
21
+ * The moniker is unique inside a project for which a dump got created
22
+ */
23
+ UniquenessLevel.project = 'project';
24
+ /**
25
+ * The moniker is unique inside the group to which a project belongs
26
+ */
27
+ UniquenessLevel.group = 'group';
28
+ /**
29
+ * The moniker is unique inside the moniker scheme.
30
+ */
31
+ UniquenessLevel.scheme = 'scheme';
32
+ /**
33
+ * The moniker is globally unique
34
+ */
35
+ UniquenessLevel.global = 'global';
36
+ })(UniquenessLevel || (exports.UniquenessLevel = UniquenessLevel = {}));
37
+ /**
38
+ * The moniker kind.
39
+ *
40
+ * @since 3.16.0
41
+ */
42
+ var MonikerKind;
43
+ (function (MonikerKind) {
44
+ /**
45
+ * The moniker represent a symbol that is imported into a project
46
+ */
47
+ MonikerKind.$import = 'import';
48
+ /**
49
+ * The moniker represents a symbol that is exported from a project
50
+ */
51
+ MonikerKind.$export = 'export';
52
+ /**
53
+ * The moniker represents a symbol that is local to a project (e.g. a local
54
+ * variable of a function, a class not visible outside the project, ...)
55
+ */
56
+ MonikerKind.local = 'local';
57
+ })(MonikerKind || (exports.MonikerKind = MonikerKind = {}));
58
+ /**
59
+ * A request to get the moniker of a symbol at a given text document position.
60
+ * The request parameter is of type {@link TextDocumentPositionParams}.
61
+ * The response is of type {@link Moniker Moniker[]} or `null`.
62
+ */
63
+ var MonikerRequest;
64
+ (function (MonikerRequest) {
65
+ MonikerRequest.method = 'textDocument/moniker';
66
+ MonikerRequest.messageDirection = messages_1.MessageDirection.clientToServer;
67
+ MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);
68
+ MonikerRequest.capabilities = messages_1.CM.create('textDocument.moniker', 'monikerProvider');
69
+ })(MonikerRequest || (exports.MonikerRequest = MonikerRequest = {}));
@@ -0,0 +1,428 @@
1
+ import { URI, integer, DocumentUri, uinteger, TextDocumentItem, TextDocumentIdentifier, VersionedTextDocumentIdentifier, LSPObject } from 'vscode-languageserver-types';
2
+ import { MessageDirection, ProtocolNotificationType, RegistrationType } from './messages';
3
+ import type { StaticRegistrationOptions, NotebookDocumentFilter, TextDocumentContentChangeEvent } from './protocol';
4
+ /**
5
+ * Notebook specific client capabilities.
6
+ *
7
+ * @since 3.17.0
8
+ */
9
+ export type NotebookDocumentSyncClientCapabilities = {
10
+ /**
11
+ * Whether implementation supports dynamic registration. If this is
12
+ * set to `true` the client supports the new
13
+ * `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
14
+ * return value for the corresponding server capability as well.
15
+ */
16
+ dynamicRegistration?: boolean;
17
+ /**
18
+ * The client supports sending execution summary data per cell.
19
+ */
20
+ executionSummarySupport?: boolean;
21
+ };
22
+ /**
23
+ * A notebook cell kind.
24
+ *
25
+ * @since 3.17.0
26
+ */
27
+ export declare namespace NotebookCellKind {
28
+ /**
29
+ * A markup-cell is formatted source that is used for display.
30
+ */
31
+ const Markup: 1;
32
+ /**
33
+ * A code-cell is source code.
34
+ */
35
+ const Code: 2;
36
+ function is(value: any): value is NotebookCellKind;
37
+ }
38
+ export type NotebookCellKind = 1 | 2;
39
+ export type ExecutionSummary = {
40
+ /**
41
+ * A strict monotonically increasing value
42
+ * indicating the execution order of a cell
43
+ * inside a notebook.
44
+ */
45
+ executionOrder: uinteger;
46
+ /**
47
+ * Whether the execution was successful or
48
+ * not if known by the client.
49
+ */
50
+ success?: boolean;
51
+ };
52
+ export declare namespace ExecutionSummary {
53
+ function create(executionOrder: number, success?: boolean): ExecutionSummary;
54
+ function is(value: any): value is ExecutionSummary;
55
+ function equals(one: ExecutionSummary | undefined, other: ExecutionSummary | undefined): boolean;
56
+ }
57
+ /**
58
+ * A notebook cell.
59
+ *
60
+ * A cell's document URI must be unique across ALL notebook
61
+ * cells and can therefore be used to uniquely identify a
62
+ * notebook cell or the cell's text document.
63
+ *
64
+ * @since 3.17.0
65
+ */
66
+ export type NotebookCell = {
67
+ /**
68
+ * The cell's kind
69
+ */
70
+ kind: NotebookCellKind;
71
+ /**
72
+ * The URI of the cell's text document
73
+ * content.
74
+ */
75
+ document: DocumentUri;
76
+ /**
77
+ * Additional metadata stored with the cell.
78
+ *
79
+ * Note: should always be an object literal (e.g. LSPObject)
80
+ */
81
+ metadata?: LSPObject;
82
+ /**
83
+ * Additional execution summary information
84
+ * if supported by the client.
85
+ */
86
+ executionSummary?: ExecutionSummary;
87
+ };
88
+ export declare namespace NotebookCell {
89
+ function create(kind: NotebookCellKind, document: DocumentUri): NotebookCell;
90
+ function is(value: any): value is NotebookCell;
91
+ function diff(one: NotebookCell, two: NotebookCell): Set<keyof NotebookCell>;
92
+ }
93
+ /**
94
+ * A notebook document.
95
+ *
96
+ * @since 3.17.0
97
+ */
98
+ export type NotebookDocument = {
99
+ /**
100
+ * The notebook document's uri.
101
+ */
102
+ uri: URI;
103
+ /**
104
+ * The type of the notebook.
105
+ */
106
+ notebookType: string;
107
+ /**
108
+ * The version number of this document (it will increase after each
109
+ * change, including undo/redo).
110
+ */
111
+ version: integer;
112
+ /**
113
+ * Additional metadata stored with the notebook
114
+ * document.
115
+ *
116
+ * Note: should always be an object literal (e.g. LSPObject)
117
+ */
118
+ metadata?: LSPObject;
119
+ /**
120
+ * The cells of a notebook.
121
+ */
122
+ cells: NotebookCell[];
123
+ };
124
+ export declare namespace NotebookDocument {
125
+ function create(uri: URI, notebookType: string, version: integer, cells: NotebookCell[]): NotebookDocument;
126
+ function is(value: any): value is NotebookDocument;
127
+ }
128
+ /**
129
+ * A literal to identify a notebook document in the client.
130
+ *
131
+ * @since 3.17.0
132
+ */
133
+ export type NotebookDocumentIdentifier = {
134
+ /**
135
+ * The notebook document's uri.
136
+ */
137
+ uri: URI;
138
+ };
139
+ /**
140
+ * A versioned notebook document identifier.
141
+ *
142
+ * @since 3.17.0
143
+ */
144
+ export type VersionedNotebookDocumentIdentifier = {
145
+ /**
146
+ * The version number of this notebook document.
147
+ */
148
+ version: integer;
149
+ /**
150
+ * The notebook document's uri.
151
+ */
152
+ uri: URI;
153
+ };
154
+ /**
155
+ * @since 3.18.0
156
+ */
157
+ export type NotebookCellLanguage = {
158
+ language: string;
159
+ };
160
+ /**
161
+ * @since 3.18.0
162
+ */
163
+ export type NotebookDocumentFilterWithNotebook = {
164
+ /**
165
+ * The notebook to be synced If a string
166
+ * value is provided it matches against the
167
+ * notebook type. '*' matches every notebook.
168
+ */
169
+ notebook: string | NotebookDocumentFilter;
170
+ /**
171
+ * The cells of the matching notebook to be synced.
172
+ */
173
+ cells?: NotebookCellLanguage[];
174
+ };
175
+ /**
176
+ * @since 3.18.0
177
+ */
178
+ export type NotebookDocumentFilterWithCells = {
179
+ /**
180
+ * The notebook to be synced If a string
181
+ * value is provided it matches against the
182
+ * notebook type. '*' matches every notebook.
183
+ */
184
+ notebook?: string | NotebookDocumentFilter;
185
+ /**
186
+ * The cells of the matching notebook to be synced.
187
+ */
188
+ cells: NotebookCellLanguage[];
189
+ };
190
+ /**
191
+ * Options specific to a notebook plus its cells
192
+ * to be synced to the server.
193
+ *
194
+ * If a selector provides a notebook document
195
+ * filter but no cell selector all cells of a
196
+ * matching notebook document will be synced.
197
+ *
198
+ * If a selector provides no notebook document
199
+ * filter but only a cell selector all notebook
200
+ * document that contain at least one matching
201
+ * cell will be synced.
202
+ *
203
+ * @since 3.17.0
204
+ */
205
+ export type NotebookDocumentSyncOptions = {
206
+ /**
207
+ * The notebooks to be synced
208
+ */
209
+ notebookSelector: (NotebookDocumentFilterWithNotebook | NotebookDocumentFilterWithCells)[];
210
+ /**
211
+ * Whether save notification should be forwarded to
212
+ * the server. Will only be honored if mode === `notebook`.
213
+ */
214
+ save?: boolean;
215
+ };
216
+ /**
217
+ * Registration options specific to a notebook.
218
+ *
219
+ * @since 3.17.0
220
+ */
221
+ export type NotebookDocumentSyncRegistrationOptions = NotebookDocumentSyncOptions & StaticRegistrationOptions;
222
+ export declare namespace NotebookDocumentSyncRegistrationType {
223
+ const method: 'notebookDocument/sync';
224
+ const messageDirection: MessageDirection;
225
+ const type: RegistrationType<NotebookDocumentSyncRegistrationOptions>;
226
+ }
227
+ /**
228
+ * The params sent in an open notebook document notification.
229
+ *
230
+ * @since 3.17.0
231
+ */
232
+ export type DidOpenNotebookDocumentParams = {
233
+ /**
234
+ * The notebook document that got opened.
235
+ */
236
+ notebookDocument: NotebookDocument;
237
+ /**
238
+ * The text documents that represent the content
239
+ * of a notebook cell.
240
+ */
241
+ cellTextDocuments: TextDocumentItem[];
242
+ };
243
+ /**
244
+ * A notification sent when a notebook opens.
245
+ *
246
+ * @since 3.17.0
247
+ */
248
+ export declare namespace DidOpenNotebookDocumentNotification {
249
+ const method: 'notebookDocument/didOpen';
250
+ const messageDirection: MessageDirection;
251
+ const type: ProtocolNotificationType<DidOpenNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
252
+ const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
253
+ }
254
+ /**
255
+ * A change describing how to move a `NotebookCell`
256
+ * array from state S to S'.
257
+ *
258
+ * @since 3.17.0
259
+ */
260
+ export type NotebookCellArrayChange = {
261
+ /**
262
+ * The start oftest of the cell that changed.
263
+ */
264
+ start: uinteger;
265
+ /**
266
+ * The deleted cells
267
+ */
268
+ deleteCount: uinteger;
269
+ /**
270
+ * The new cells, if any
271
+ */
272
+ cells?: NotebookCell[];
273
+ };
274
+ export declare namespace NotebookCellArrayChange {
275
+ function is(value: any): value is NotebookCellArrayChange;
276
+ function create(start: uinteger, deleteCount: uinteger, cells?: NotebookCell[]): NotebookCellArrayChange;
277
+ }
278
+ /**
279
+ * Structural changes to cells in a notebook document.
280
+ *
281
+ * @since 3.18.0
282
+ */
283
+ export type NotebookDocumentCellChangeStructure = {
284
+ /**
285
+ * The change to the cell array.
286
+ */
287
+ array: NotebookCellArrayChange;
288
+ /**
289
+ * Additional opened cell text documents.
290
+ */
291
+ didOpen?: TextDocumentItem[];
292
+ /**
293
+ * Additional closed cell text documents.
294
+ */
295
+ didClose?: TextDocumentIdentifier[];
296
+ };
297
+ /**
298
+ * Content changes to a cell in a notebook document.
299
+ *
300
+ * @since 3.18.0
301
+ */
302
+ export type NotebookDocumentCellContentChanges = {
303
+ document: VersionedTextDocumentIdentifier;
304
+ changes: TextDocumentContentChangeEvent[];
305
+ };
306
+ /**
307
+ * Cell changes to a notebook document.
308
+ *
309
+ * @since 3.18.0
310
+ */
311
+ export type NotebookDocumentCellChanges = {
312
+ /**
313
+ * Changes to the cell structure to add or
314
+ * remove cells.
315
+ */
316
+ structure?: NotebookDocumentCellChangeStructure;
317
+ /**
318
+ * Changes to notebook cells properties like its
319
+ * kind, execution summary or metadata.
320
+ */
321
+ data?: NotebookCell[];
322
+ /**
323
+ * Changes to the text content of notebook cells.
324
+ */
325
+ textContent?: NotebookDocumentCellContentChanges[];
326
+ };
327
+ /**
328
+ * A change event for a notebook document.
329
+ *
330
+ * @since 3.17.0
331
+ */
332
+ export type NotebookDocumentChangeEvent = {
333
+ /**
334
+ * The changed meta data if any.
335
+ *
336
+ * Note: should always be an object literal (e.g. LSPObject)
337
+ */
338
+ metadata?: LSPObject;
339
+ /**
340
+ * Changes to cells
341
+ */
342
+ cells?: NotebookDocumentCellChanges;
343
+ };
344
+ /**
345
+ * The params sent in a change notebook document notification.
346
+ *
347
+ * @since 3.17.0
348
+ */
349
+ export type DidChangeNotebookDocumentParams = {
350
+ /**
351
+ * The notebook document that did change. The version number points
352
+ * to the version after all provided changes have been applied. If
353
+ * only the text document content of a cell changes the notebook version
354
+ * doesn't necessarily have to change.
355
+ */
356
+ notebookDocument: VersionedNotebookDocumentIdentifier;
357
+ /**
358
+ * The actual changes to the notebook document.
359
+ *
360
+ * The changes describe single state changes to the notebook document.
361
+ * So if there are two changes c1 (at array index 0) and c2 (at array
362
+ * index 1) for a notebook in state S then c1 moves the notebook from
363
+ * S to S' and c2 from S' to S''. So c1 is computed on the state S and
364
+ * c2 is computed on the state S'.
365
+ *
366
+ * To mirror the content of a notebook using change events use the following approach:
367
+ * - start with the same initial content
368
+ * - apply the 'notebookDocument/didChange' notifications in the order you receive them.
369
+ * - apply the `NotebookChangeEvent`s in a single notification in the order
370
+ * you receive them.
371
+ */
372
+ change: NotebookDocumentChangeEvent;
373
+ };
374
+ export declare namespace DidChangeNotebookDocumentNotification {
375
+ const method: 'notebookDocument/didChange';
376
+ const messageDirection: MessageDirection;
377
+ const type: ProtocolNotificationType<DidChangeNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
378
+ const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
379
+ }
380
+ /**
381
+ * The params sent in a save notebook document notification.
382
+ *
383
+ * @since 3.17.0
384
+ */
385
+ export type DidSaveNotebookDocumentParams = {
386
+ /**
387
+ * The notebook document that got saved.
388
+ */
389
+ notebookDocument: NotebookDocumentIdentifier;
390
+ };
391
+ /**
392
+ * A notification sent when a notebook document is saved.
393
+ *
394
+ * @since 3.17.0
395
+ */
396
+ export declare namespace DidSaveNotebookDocumentNotification {
397
+ const method: 'notebookDocument/didSave';
398
+ const messageDirection: MessageDirection;
399
+ const type: ProtocolNotificationType<DidSaveNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
400
+ const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
401
+ }
402
+ /**
403
+ * The params sent in a close notebook document notification.
404
+ *
405
+ * @since 3.17.0
406
+ */
407
+ export type DidCloseNotebookDocumentParams = {
408
+ /**
409
+ * The notebook document that got closed.
410
+ */
411
+ notebookDocument: NotebookDocumentIdentifier;
412
+ /**
413
+ * The text documents that represent the content
414
+ * of a notebook cell that got closed.
415
+ */
416
+ cellTextDocuments: TextDocumentIdentifier[];
417
+ };
418
+ /**
419
+ * A notification sent when a notebook closes.
420
+ *
421
+ * @since 3.17.0
422
+ */
423
+ export declare namespace DidCloseNotebookDocumentNotification {
424
+ const method: 'notebookDocument/didClose';
425
+ const messageDirection: MessageDirection;
426
+ const type: ProtocolNotificationType<DidCloseNotebookDocumentParams, NotebookDocumentSyncRegistrationOptions>;
427
+ const registrationMethod: typeof NotebookDocumentSyncRegistrationType.method;
428
+ }