monaco-editor-core 0.29.0 → 0.29.1

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 (45) hide show
  1. package/ThirdPartyNotices.txt +63 -63
  2. package/dev/bundleInfo.json +951 -951
  3. package/dev/nls.metadata.json +382 -382
  4. package/dev/vs/base/worker/workerMain.js +1 -1
  5. package/dev/vs/editor/editor.main.css +1 -1
  6. package/dev/vs/editor/editor.main.js +1 -1
  7. package/dev/vs/editor/editor.main.nls.de.js +1 -1
  8. package/dev/vs/editor/editor.main.nls.es.js +1 -1
  9. package/dev/vs/editor/editor.main.nls.fr.js +1 -1
  10. package/dev/vs/editor/editor.main.nls.it.js +1 -1
  11. package/dev/vs/editor/editor.main.nls.ja.js +1 -1
  12. package/dev/vs/editor/editor.main.nls.js +1 -1
  13. package/dev/vs/editor/editor.main.nls.ko.js +1 -1
  14. package/dev/vs/editor/editor.main.nls.ru.js +1 -1
  15. package/dev/vs/editor/editor.main.nls.zh-cn.js +1 -1
  16. package/dev/vs/editor/editor.main.nls.zh-tw.js +1 -1
  17. package/dev/vs/loader.js +1 -1
  18. package/esm/vs/editor/editor.api.d.ts +793 -797
  19. package/min/vs/base/worker/workerMain.js +1 -1
  20. package/min/vs/editor/editor.main.css +1 -1
  21. package/min/vs/editor/editor.main.js +1 -1
  22. package/min/vs/editor/editor.main.nls.de.js +1 -1
  23. package/min/vs/editor/editor.main.nls.es.js +1 -1
  24. package/min/vs/editor/editor.main.nls.fr.js +1 -1
  25. package/min/vs/editor/editor.main.nls.it.js +1 -1
  26. package/min/vs/editor/editor.main.nls.ja.js +1 -1
  27. package/min/vs/editor/editor.main.nls.js +1 -1
  28. package/min/vs/editor/editor.main.nls.ko.js +1 -1
  29. package/min/vs/editor/editor.main.nls.ru.js +1 -1
  30. package/min/vs/editor/editor.main.nls.zh-cn.js +1 -1
  31. package/min/vs/editor/editor.main.nls.zh-tw.js +1 -1
  32. package/min/vs/loader.js +1 -1
  33. package/min-maps/vs/editor/editor.main.nls.de.js.map +1 -1
  34. package/min-maps/vs/editor/editor.main.nls.es.js.map +1 -1
  35. package/min-maps/vs/editor/editor.main.nls.fr.js.map +1 -1
  36. package/min-maps/vs/editor/editor.main.nls.it.js.map +1 -1
  37. package/min-maps/vs/editor/editor.main.nls.ja.js.map +1 -1
  38. package/min-maps/vs/editor/editor.main.nls.js.map +1 -1
  39. package/min-maps/vs/editor/editor.main.nls.ko.js.map +1 -1
  40. package/min-maps/vs/editor/editor.main.nls.ru.js.map +1 -1
  41. package/min-maps/vs/editor/editor.main.nls.zh-cn.js.map +1 -1
  42. package/min-maps/vs/editor/editor.main.nls.zh-tw.js.map +1 -1
  43. package/min-maps/vs/loader.js.map +1 -1
  44. package/package.json +1 -1
  45. package/version.txt +1 -1
@@ -3,845 +3,841 @@
3
3
  * Licensed under the MIT License. See License.txt in the project root for license information.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
 
6
- export = monaco;
7
6
  declare global {
8
- let MonacoEnvironment: monaco.Environment | undefined;
7
+ let MonacoEnvironment: Environment | undefined;
9
8
  }
10
9
 
11
10
  interface Window {
12
- MonacoEnvironment?: monaco.Environment | undefined;
11
+ MonacoEnvironment?: Environment | undefined;
13
12
  }
14
13
 
15
- declare namespace monaco {
14
+ export type Thenable<T> = PromiseLike<T>;
16
15
 
17
- export type Thenable<T> = PromiseLike<T>;
18
-
19
- export interface Environment {
20
- globalAPI?: boolean;
21
- baseUrl?: string;
22
- getWorker?(workerId: string, label: string): Worker;
23
- getWorkerUrl?(workerId: string, label: string): string;
24
- }
16
+ export interface Environment {
17
+ globalAPI?: boolean;
18
+ baseUrl?: string;
19
+ getWorker?(workerId: string, label: string): Worker;
20
+ getWorkerUrl?(workerId: string, label: string): string;
21
+ }
25
22
 
26
- export interface IDisposable {
27
- dispose(): void;
28
- }
23
+ export interface IDisposable {
24
+ dispose(): void;
25
+ }
29
26
 
30
- export interface IEvent<T> {
31
- (listener: (e: T) => any, thisArg?: any): IDisposable;
32
- }
27
+ export interface IEvent<T> {
28
+ (listener: (e: T) => any, thisArg?: any): IDisposable;
29
+ }
33
30
 
34
- /**
35
- * A helper that allows to emit and listen to typed events
36
- */
37
- export class Emitter<T> {
38
- constructor();
39
- readonly event: IEvent<T>;
40
- fire(event: T): void;
41
- dispose(): void;
42
- }
31
+ /**
32
+ * A helper that allows to emit and listen to typed events
33
+ */
34
+ export class Emitter<T> {
35
+ constructor();
36
+ readonly event: IEvent<T>;
37
+ fire(event: T): void;
38
+ dispose(): void;
39
+ }
43
40
 
44
- export enum MarkerTag {
45
- Unnecessary = 1,
46
- Deprecated = 2
47
- }
41
+ export enum MarkerTag {
42
+ Unnecessary = 1,
43
+ Deprecated = 2
44
+ }
48
45
 
49
- export enum MarkerSeverity {
50
- Hint = 1,
51
- Info = 2,
52
- Warning = 4,
53
- Error = 8
54
- }
46
+ export enum MarkerSeverity {
47
+ Hint = 1,
48
+ Info = 2,
49
+ Warning = 4,
50
+ Error = 8
51
+ }
55
52
 
56
- export class CancellationTokenSource {
57
- constructor(parent?: CancellationToken);
58
- get token(): CancellationToken;
59
- cancel(): void;
60
- dispose(cancel?: boolean): void;
61
- }
53
+ export class CancellationTokenSource {
54
+ constructor(parent?: CancellationToken);
55
+ get token(): CancellationToken;
56
+ cancel(): void;
57
+ dispose(cancel?: boolean): void;
58
+ }
62
59
 
63
- export interface CancellationToken {
64
- /**
65
- * A flag signalling is cancellation has been requested.
66
- */
67
- readonly isCancellationRequested: boolean;
68
- /**
69
- * An event which fires when cancellation is requested. This event
70
- * only ever fires `once` as cancellation can only happen once. Listeners
71
- * that are registered after cancellation will be called (next event loop run),
72
- * but also only once.
73
- *
74
- * @event
75
- */
76
- readonly onCancellationRequested: (listener: (e: any) => any, thisArgs?: any, disposables?: IDisposable[]) => IDisposable;
77
- }
60
+ export interface CancellationToken {
61
+ /**
62
+ * A flag signalling is cancellation has been requested.
63
+ */
64
+ readonly isCancellationRequested: boolean;
78
65
  /**
79
- * Uniform Resource Identifier (Uri) http://tools.ietf.org/html/rfc3986.
80
- * This class is a simple parser which creates the basic component parts
81
- * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
82
- * and encoding.
66
+ * An event which fires when cancellation is requested. This event
67
+ * only ever fires `once` as cancellation can only happen once. Listeners
68
+ * that are registered after cancellation will be called (next event loop run),
69
+ * but also only once.
83
70
  *
84
- * ```txt
85
- * foo://example.com:8042/over/there?name=ferret#nose
86
- * \_/ \______________/\_________/ \_________/ \__/
87
- * | | | | |
88
- * scheme authority path query fragment
89
- * | _____________________|__
90
- * / \ / \
91
- * urn:example:animal:ferret:nose
92
- * ```
71
+ * @event
93
72
  */
94
- export class Uri implements UriComponents {
95
- static isUri(thing: any): thing is Uri;
96
- /**
97
- * scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'.
98
- * The part before the first colon.
99
- */
100
- readonly scheme: string;
101
- /**
102
- * authority is the 'www.msft.com' part of 'http://www.msft.com/some/path?query#fragment'.
103
- * The part between the first double slashes and the next slash.
104
- */
105
- readonly authority: string;
106
- /**
107
- * path is the '/some/path' part of 'http://www.msft.com/some/path?query#fragment'.
108
- */
109
- readonly path: string;
110
- /**
111
- * query is the 'query' part of 'http://www.msft.com/some/path?query#fragment'.
112
- */
113
- readonly query: string;
114
- /**
115
- * fragment is the 'fragment' part of 'http://www.msft.com/some/path?query#fragment'.
116
- */
117
- readonly fragment: string;
118
- /**
119
- * Returns a string representing the corresponding file system path of this Uri.
120
- * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
121
- * platform specific path separator.
122
- *
123
- * * Will *not* validate the path for invalid characters and semantics.
124
- * * Will *not* look at the scheme of this Uri.
125
- * * The result shall *not* be used for display purposes but for accessing a file on disk.
126
- *
127
- *
128
- * The *difference* to `Uri#path` is the use of the platform specific separator and the handling
129
- * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
130
- *
131
- * ```ts
132
- const u = Uri.parse('file://server/c$/folder/file.txt')
133
- u.authority === 'server'
134
- u.path === '/shares/c$/file.txt'
135
- u.fsPath === '\\server\c$\folder\file.txt'
136
- ```
137
- *
138
- * Using `Uri#path` to read a file (using fs-apis) would not be enough because parts of the path,
139
- * namely the server name, would be missing. Therefore `Uri#fsPath` exists - it's sugar to ease working
140
- * with URIs that represent files on disk (`file` scheme).
141
- */
142
- get fsPath(): string;
143
- with(change: {
144
- scheme?: string;
145
- authority?: string | null;
146
- path?: string | null;
147
- query?: string | null;
148
- fragment?: string | null;
149
- }): Uri;
150
- /**
151
- * Creates a new Uri from a string, e.g. `http://www.msft.com/some/path`,
152
- * `file:///usr/home`, or `scheme:with/path`.
153
- *
154
- * @param value A string which represents an Uri (see `Uri#toString`).
155
- */
156
- static parse(value: string, _strict?: boolean): Uri;
157
- /**
158
- * Creates a new Uri from a file system path, e.g. `c:\my\files`,
159
- * `/usr/home`, or `\\server\share\some\path`.
160
- *
161
- * The *difference* between `Uri#parse` and `Uri#file` is that the latter treats the argument
162
- * as path, not as stringified-uri. E.g. `Uri.file(path)` is **not the same as**
163
- * `Uri.parse('file://' + path)` because the path might contain characters that are
164
- * interpreted (# and ?). See the following sample:
165
- * ```ts
166
- const good = Uri.file('/coding/c#/project1');
167
- good.scheme === 'file';
168
- good.path === '/coding/c#/project1';
169
- good.fragment === '';
170
- const bad = Uri.parse('file://' + '/coding/c#/project1');
171
- bad.scheme === 'file';
172
- bad.path === '/coding/c'; // path is now broken
173
- bad.fragment === '/project1';
174
- ```
175
- *
176
- * @param path A file system path (see `Uri#fsPath`)
177
- */
178
- static file(path: string): Uri;
179
- static from(components: {
180
- scheme: string;
181
- authority?: string;
182
- path?: string;
183
- query?: string;
184
- fragment?: string;
185
- }): Uri;
186
- /**
187
- * Join a Uri path with path fragments and normalizes the resulting path.
188
- *
189
- * @param uri The input Uri.
190
- * @param pathFragment The path fragment to add to the Uri path.
191
- * @returns The resulting Uri.
192
- */
193
- static joinPath(uri: Uri, ...pathFragment: string[]): Uri;
194
- /**
195
- * Creates a string representation for this Uri. It's guaranteed that calling
196
- * `Uri.parse` with the result of this function creates an Uri which is equal
197
- * to this Uri.
198
- *
199
- * * The result shall *not* be used for display purposes but for externalization or transport.
200
- * * The result will be encoded using the percentage encoding and encoding happens mostly
201
- * ignore the scheme-specific encoding rules.
202
- *
203
- * @param skipEncoding Do not encode the result, default is `false`
204
- */
205
- toString(skipEncoding?: boolean): string;
206
- toJSON(): UriComponents;
207
- static revive(data: UriComponents | Uri): Uri;
208
- static revive(data: UriComponents | Uri | undefined): Uri | undefined;
209
- static revive(data: UriComponents | Uri | null): Uri | null;
210
- static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;
211
- }
212
-
213
- export interface UriComponents {
73
+ readonly onCancellationRequested: (listener: (e: any) => any, thisArgs?: any, disposables?: IDisposable[]) => IDisposable;
74
+ }
75
+ /**
76
+ * Uniform Resource Identifier (Uri) http://tools.ietf.org/html/rfc3986.
77
+ * This class is a simple parser which creates the basic component parts
78
+ * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
79
+ * and encoding.
80
+ *
81
+ * ```txt
82
+ * foo://example.com:8042/over/there?name=ferret#nose
83
+ * \_/ \______________/\_________/ \_________/ \__/
84
+ * | | | | |
85
+ * scheme authority path query fragment
86
+ * | _____________________|__
87
+ * / \ / \
88
+ * urn:example:animal:ferret:nose
89
+ * ```
90
+ */
91
+ export class Uri implements UriComponents {
92
+ static isUri(thing: any): thing is Uri;
93
+ /**
94
+ * scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'.
95
+ * The part before the first colon.
96
+ */
97
+ readonly scheme: string;
98
+ /**
99
+ * authority is the 'www.msft.com' part of 'http://www.msft.com/some/path?query#fragment'.
100
+ * The part between the first double slashes and the next slash.
101
+ */
102
+ readonly authority: string;
103
+ /**
104
+ * path is the '/some/path' part of 'http://www.msft.com/some/path?query#fragment'.
105
+ */
106
+ readonly path: string;
107
+ /**
108
+ * query is the 'query' part of 'http://www.msft.com/some/path?query#fragment'.
109
+ */
110
+ readonly query: string;
111
+ /**
112
+ * fragment is the 'fragment' part of 'http://www.msft.com/some/path?query#fragment'.
113
+ */
114
+ readonly fragment: string;
115
+ /**
116
+ * Returns a string representing the corresponding file system path of this Uri.
117
+ * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
118
+ * platform specific path separator.
119
+ *
120
+ * * Will *not* validate the path for invalid characters and semantics.
121
+ * * Will *not* look at the scheme of this Uri.
122
+ * * The result shall *not* be used for display purposes but for accessing a file on disk.
123
+ *
124
+ *
125
+ * The *difference* to `Uri#path` is the use of the platform specific separator and the handling
126
+ * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
127
+ *
128
+ * ```ts
129
+ const u = Uri.parse('file://server/c$/folder/file.txt')
130
+ u.authority === 'server'
131
+ u.path === '/shares/c$/file.txt'
132
+ u.fsPath === '\\server\c$\folder\file.txt'
133
+ ```
134
+ *
135
+ * Using `Uri#path` to read a file (using fs-apis) would not be enough because parts of the path,
136
+ * namely the server name, would be missing. Therefore `Uri#fsPath` exists - it's sugar to ease working
137
+ * with URIs that represent files on disk (`file` scheme).
138
+ */
139
+ get fsPath(): string;
140
+ with(change: {
141
+ scheme?: string;
142
+ authority?: string | null;
143
+ path?: string | null;
144
+ query?: string | null;
145
+ fragment?: string | null;
146
+ }): Uri;
147
+ /**
148
+ * Creates a new Uri from a string, e.g. `http://www.msft.com/some/path`,
149
+ * `file:///usr/home`, or `scheme:with/path`.
150
+ *
151
+ * @param value A string which represents an Uri (see `Uri#toString`).
152
+ */
153
+ static parse(value: string, _strict?: boolean): Uri;
154
+ /**
155
+ * Creates a new Uri from a file system path, e.g. `c:\my\files`,
156
+ * `/usr/home`, or `\\server\share\some\path`.
157
+ *
158
+ * The *difference* between `Uri#parse` and `Uri#file` is that the latter treats the argument
159
+ * as path, not as stringified-uri. E.g. `Uri.file(path)` is **not the same as**
160
+ * `Uri.parse('file://' + path)` because the path might contain characters that are
161
+ * interpreted (# and ?). See the following sample:
162
+ * ```ts
163
+ const good = Uri.file('/coding/c#/project1');
164
+ good.scheme === 'file';
165
+ good.path === '/coding/c#/project1';
166
+ good.fragment === '';
167
+ const bad = Uri.parse('file://' + '/coding/c#/project1');
168
+ bad.scheme === 'file';
169
+ bad.path === '/coding/c'; // path is now broken
170
+ bad.fragment === '/project1';
171
+ ```
172
+ *
173
+ * @param path A file system path (see `Uri#fsPath`)
174
+ */
175
+ static file(path: string): Uri;
176
+ static from(components: {
214
177
  scheme: string;
215
- authority: string;
216
- path: string;
217
- query: string;
218
- fragment: string;
219
- }
178
+ authority?: string;
179
+ path?: string;
180
+ query?: string;
181
+ fragment?: string;
182
+ }): Uri;
183
+ /**
184
+ * Join a Uri path with path fragments and normalizes the resulting path.
185
+ *
186
+ * @param uri The input Uri.
187
+ * @param pathFragment The path fragment to add to the Uri path.
188
+ * @returns The resulting Uri.
189
+ */
190
+ static joinPath(uri: Uri, ...pathFragment: string[]): Uri;
191
+ /**
192
+ * Creates a string representation for this Uri. It's guaranteed that calling
193
+ * `Uri.parse` with the result of this function creates an Uri which is equal
194
+ * to this Uri.
195
+ *
196
+ * * The result shall *not* be used for display purposes but for externalization or transport.
197
+ * * The result will be encoded using the percentage encoding and encoding happens mostly
198
+ * ignore the scheme-specific encoding rules.
199
+ *
200
+ * @param skipEncoding Do not encode the result, default is `false`
201
+ */
202
+ toString(skipEncoding?: boolean): string;
203
+ toJSON(): UriComponents;
204
+ static revive(data: UriComponents | Uri): Uri;
205
+ static revive(data: UriComponents | Uri | undefined): Uri | undefined;
206
+ static revive(data: UriComponents | Uri | null): Uri | null;
207
+ static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;
208
+ }
209
+
210
+ export interface UriComponents {
211
+ scheme: string;
212
+ authority: string;
213
+ path: string;
214
+ query: string;
215
+ fragment: string;
216
+ }
220
217
 
218
+ /**
219
+ * Virtual Key Codes, the value does not hold any inherent meaning.
220
+ * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
221
+ * But these are "more general", as they should work across browsers & OS`s.
222
+ */
223
+ export enum KeyCode {
224
+ DependsOnKbLayout = -1,
225
+ /**
226
+ * Placed first to cover the 0 value of the enum.
227
+ */
228
+ Unknown = 0,
229
+ Backspace = 1,
230
+ Tab = 2,
231
+ Enter = 3,
232
+ Shift = 4,
233
+ Ctrl = 5,
234
+ Alt = 6,
235
+ PauseBreak = 7,
236
+ CapsLock = 8,
237
+ Escape = 9,
238
+ Space = 10,
239
+ PageUp = 11,
240
+ PageDown = 12,
241
+ End = 13,
242
+ Home = 14,
243
+ LeftArrow = 15,
244
+ UpArrow = 16,
245
+ RightArrow = 17,
246
+ DownArrow = 18,
247
+ Insert = 19,
248
+ Delete = 20,
249
+ KEY_0 = 21,
250
+ KEY_1 = 22,
251
+ KEY_2 = 23,
252
+ KEY_3 = 24,
253
+ KEY_4 = 25,
254
+ KEY_5 = 26,
255
+ KEY_6 = 27,
256
+ KEY_7 = 28,
257
+ KEY_8 = 29,
258
+ KEY_9 = 30,
259
+ KEY_A = 31,
260
+ KEY_B = 32,
261
+ KEY_C = 33,
262
+ KEY_D = 34,
263
+ KEY_E = 35,
264
+ KEY_F = 36,
265
+ KEY_G = 37,
266
+ KEY_H = 38,
267
+ KEY_I = 39,
268
+ KEY_J = 40,
269
+ KEY_K = 41,
270
+ KEY_L = 42,
271
+ KEY_M = 43,
272
+ KEY_N = 44,
273
+ KEY_O = 45,
274
+ KEY_P = 46,
275
+ KEY_Q = 47,
276
+ KEY_R = 48,
277
+ KEY_S = 49,
278
+ KEY_T = 50,
279
+ KEY_U = 51,
280
+ KEY_V = 52,
281
+ KEY_W = 53,
282
+ KEY_X = 54,
283
+ KEY_Y = 55,
284
+ KEY_Z = 56,
285
+ Meta = 57,
286
+ ContextMenu = 58,
287
+ F1 = 59,
288
+ F2 = 60,
289
+ F3 = 61,
290
+ F4 = 62,
291
+ F5 = 63,
292
+ F6 = 64,
293
+ F7 = 65,
294
+ F8 = 66,
295
+ F9 = 67,
296
+ F10 = 68,
297
+ F11 = 69,
298
+ F12 = 70,
299
+ F13 = 71,
300
+ F14 = 72,
301
+ F15 = 73,
302
+ F16 = 74,
303
+ F17 = 75,
304
+ F18 = 76,
305
+ F19 = 77,
306
+ NumLock = 78,
307
+ ScrollLock = 79,
308
+ /**
309
+ * Used for miscellaneous characters; it can vary by keyboard.
310
+ * For the US standard keyboard, the ';:' key
311
+ */
312
+ US_SEMICOLON = 80,
313
+ /**
314
+ * For any country/region, the '+' key
315
+ * For the US standard keyboard, the '=+' key
316
+ */
317
+ US_EQUAL = 81,
318
+ /**
319
+ * For any country/region, the ',' key
320
+ * For the US standard keyboard, the ',<' key
321
+ */
322
+ US_COMMA = 82,
323
+ /**
324
+ * For any country/region, the '-' key
325
+ * For the US standard keyboard, the '-_' key
326
+ */
327
+ US_MINUS = 83,
328
+ /**
329
+ * For any country/region, the '.' key
330
+ * For the US standard keyboard, the '.>' key
331
+ */
332
+ US_DOT = 84,
333
+ /**
334
+ * Used for miscellaneous characters; it can vary by keyboard.
335
+ * For the US standard keyboard, the '/?' key
336
+ */
337
+ US_SLASH = 85,
338
+ /**
339
+ * Used for miscellaneous characters; it can vary by keyboard.
340
+ * For the US standard keyboard, the '`~' key
341
+ */
342
+ US_BACKTICK = 86,
343
+ /**
344
+ * Used for miscellaneous characters; it can vary by keyboard.
345
+ * For the US standard keyboard, the '[{' key
346
+ */
347
+ US_OPEN_SQUARE_BRACKET = 87,
348
+ /**
349
+ * Used for miscellaneous characters; it can vary by keyboard.
350
+ * For the US standard keyboard, the '\|' key
351
+ */
352
+ US_BACKSLASH = 88,
353
+ /**
354
+ * Used for miscellaneous characters; it can vary by keyboard.
355
+ * For the US standard keyboard, the ']}' key
356
+ */
357
+ US_CLOSE_SQUARE_BRACKET = 89,
358
+ /**
359
+ * Used for miscellaneous characters; it can vary by keyboard.
360
+ * For the US standard keyboard, the ''"' key
361
+ */
362
+ US_QUOTE = 90,
363
+ /**
364
+ * Used for miscellaneous characters; it can vary by keyboard.
365
+ */
366
+ OEM_8 = 91,
367
+ /**
368
+ * Either the angle bracket key or the backslash key on the RT 102-key keyboard.
369
+ */
370
+ OEM_102 = 92,
371
+ NUMPAD_0 = 93,
372
+ NUMPAD_1 = 94,
373
+ NUMPAD_2 = 95,
374
+ NUMPAD_3 = 96,
375
+ NUMPAD_4 = 97,
376
+ NUMPAD_5 = 98,
377
+ NUMPAD_6 = 99,
378
+ NUMPAD_7 = 100,
379
+ NUMPAD_8 = 101,
380
+ NUMPAD_9 = 102,
381
+ NUMPAD_MULTIPLY = 103,
382
+ NUMPAD_ADD = 104,
383
+ NUMPAD_SEPARATOR = 105,
384
+ NUMPAD_SUBTRACT = 106,
385
+ NUMPAD_DECIMAL = 107,
386
+ NUMPAD_DIVIDE = 108,
221
387
  /**
222
- * Virtual Key Codes, the value does not hold any inherent meaning.
223
- * Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
224
- * But these are "more general", as they should work across browsers & OS`s.
388
+ * Cover all key codes when IME is processing input.
225
389
  */
226
- export enum KeyCode {
227
- DependsOnKbLayout = -1,
228
- /**
229
- * Placed first to cover the 0 value of the enum.
230
- */
231
- Unknown = 0,
232
- Backspace = 1,
233
- Tab = 2,
234
- Enter = 3,
235
- Shift = 4,
236
- Ctrl = 5,
237
- Alt = 6,
238
- PauseBreak = 7,
239
- CapsLock = 8,
240
- Escape = 9,
241
- Space = 10,
242
- PageUp = 11,
243
- PageDown = 12,
244
- End = 13,
245
- Home = 14,
246
- LeftArrow = 15,
247
- UpArrow = 16,
248
- RightArrow = 17,
249
- DownArrow = 18,
250
- Insert = 19,
251
- Delete = 20,
252
- KEY_0 = 21,
253
- KEY_1 = 22,
254
- KEY_2 = 23,
255
- KEY_3 = 24,
256
- KEY_4 = 25,
257
- KEY_5 = 26,
258
- KEY_6 = 27,
259
- KEY_7 = 28,
260
- KEY_8 = 29,
261
- KEY_9 = 30,
262
- KEY_A = 31,
263
- KEY_B = 32,
264
- KEY_C = 33,
265
- KEY_D = 34,
266
- KEY_E = 35,
267
- KEY_F = 36,
268
- KEY_G = 37,
269
- KEY_H = 38,
270
- KEY_I = 39,
271
- KEY_J = 40,
272
- KEY_K = 41,
273
- KEY_L = 42,
274
- KEY_M = 43,
275
- KEY_N = 44,
276
- KEY_O = 45,
277
- KEY_P = 46,
278
- KEY_Q = 47,
279
- KEY_R = 48,
280
- KEY_S = 49,
281
- KEY_T = 50,
282
- KEY_U = 51,
283
- KEY_V = 52,
284
- KEY_W = 53,
285
- KEY_X = 54,
286
- KEY_Y = 55,
287
- KEY_Z = 56,
288
- Meta = 57,
289
- ContextMenu = 58,
290
- F1 = 59,
291
- F2 = 60,
292
- F3 = 61,
293
- F4 = 62,
294
- F5 = 63,
295
- F6 = 64,
296
- F7 = 65,
297
- F8 = 66,
298
- F9 = 67,
299
- F10 = 68,
300
- F11 = 69,
301
- F12 = 70,
302
- F13 = 71,
303
- F14 = 72,
304
- F15 = 73,
305
- F16 = 74,
306
- F17 = 75,
307
- F18 = 76,
308
- F19 = 77,
309
- NumLock = 78,
310
- ScrollLock = 79,
311
- /**
312
- * Used for miscellaneous characters; it can vary by keyboard.
313
- * For the US standard keyboard, the ';:' key
314
- */
315
- US_SEMICOLON = 80,
316
- /**
317
- * For any country/region, the '+' key
318
- * For the US standard keyboard, the '=+' key
319
- */
320
- US_EQUAL = 81,
321
- /**
322
- * For any country/region, the ',' key
323
- * For the US standard keyboard, the ',<' key
324
- */
325
- US_COMMA = 82,
326
- /**
327
- * For any country/region, the '-' key
328
- * For the US standard keyboard, the '-_' key
329
- */
330
- US_MINUS = 83,
331
- /**
332
- * For any country/region, the '.' key
333
- * For the US standard keyboard, the '.>' key
334
- */
335
- US_DOT = 84,
336
- /**
337
- * Used for miscellaneous characters; it can vary by keyboard.
338
- * For the US standard keyboard, the '/?' key
339
- */
340
- US_SLASH = 85,
341
- /**
342
- * Used for miscellaneous characters; it can vary by keyboard.
343
- * For the US standard keyboard, the '`~' key
344
- */
345
- US_BACKTICK = 86,
346
- /**
347
- * Used for miscellaneous characters; it can vary by keyboard.
348
- * For the US standard keyboard, the '[{' key
349
- */
350
- US_OPEN_SQUARE_BRACKET = 87,
351
- /**
352
- * Used for miscellaneous characters; it can vary by keyboard.
353
- * For the US standard keyboard, the '\|' key
354
- */
355
- US_BACKSLASH = 88,
356
- /**
357
- * Used for miscellaneous characters; it can vary by keyboard.
358
- * For the US standard keyboard, the ']}' key
359
- */
360
- US_CLOSE_SQUARE_BRACKET = 89,
361
- /**
362
- * Used for miscellaneous characters; it can vary by keyboard.
363
- * For the US standard keyboard, the ''"' key
364
- */
365
- US_QUOTE = 90,
366
- /**
367
- * Used for miscellaneous characters; it can vary by keyboard.
368
- */
369
- OEM_8 = 91,
370
- /**
371
- * Either the angle bracket key or the backslash key on the RT 102-key keyboard.
372
- */
373
- OEM_102 = 92,
374
- NUMPAD_0 = 93,
375
- NUMPAD_1 = 94,
376
- NUMPAD_2 = 95,
377
- NUMPAD_3 = 96,
378
- NUMPAD_4 = 97,
379
- NUMPAD_5 = 98,
380
- NUMPAD_6 = 99,
381
- NUMPAD_7 = 100,
382
- NUMPAD_8 = 101,
383
- NUMPAD_9 = 102,
384
- NUMPAD_MULTIPLY = 103,
385
- NUMPAD_ADD = 104,
386
- NUMPAD_SEPARATOR = 105,
387
- NUMPAD_SUBTRACT = 106,
388
- NUMPAD_DECIMAL = 107,
389
- NUMPAD_DIVIDE = 108,
390
- /**
391
- * Cover all key codes when IME is processing input.
392
- */
393
- KEY_IN_COMPOSITION = 109,
394
- ABNT_C1 = 110,
395
- ABNT_C2 = 111,
396
- /**
397
- * Placed last to cover the length of the enum.
398
- * Please do not depend on this value!
399
- */
400
- MAX_VALUE = 112
401
- }
402
- export class KeyMod {
403
- static readonly CtrlCmd: number;
404
- static readonly Shift: number;
405
- static readonly Alt: number;
406
- static readonly WinCtrl: number;
407
- static chord(firstPart: number, secondPart: number): number;
408
- }
390
+ KEY_IN_COMPOSITION = 109,
391
+ ABNT_C1 = 110,
392
+ ABNT_C2 = 111,
393
+ /**
394
+ * Placed last to cover the length of the enum.
395
+ * Please do not depend on this value!
396
+ */
397
+ MAX_VALUE = 112
398
+ }
399
+ export class KeyMod {
400
+ static readonly CtrlCmd: number;
401
+ static readonly Shift: number;
402
+ static readonly Alt: number;
403
+ static readonly WinCtrl: number;
404
+ static chord(firstPart: number, secondPart: number): number;
405
+ }
409
406
 
410
- export interface IMarkdownString {
411
- readonly value: string;
412
- readonly isTrusted?: boolean;
413
- readonly supportThemeIcons?: boolean;
414
- readonly supportHtml?: boolean;
415
- uris?: {
416
- [href: string]: UriComponents;
417
- };
418
- }
407
+ export interface IMarkdownString {
408
+ readonly value: string;
409
+ readonly isTrusted?: boolean;
410
+ readonly supportThemeIcons?: boolean;
411
+ readonly supportHtml?: boolean;
412
+ uris?: {
413
+ [href: string]: UriComponents;
414
+ };
415
+ }
419
416
 
420
- export interface IKeyboardEvent {
421
- readonly _standardKeyboardEventBrand: true;
422
- readonly browserEvent: KeyboardEvent;
423
- readonly target: HTMLElement;
424
- readonly ctrlKey: boolean;
425
- readonly shiftKey: boolean;
426
- readonly altKey: boolean;
427
- readonly metaKey: boolean;
428
- readonly keyCode: KeyCode;
429
- readonly code: string;
430
- equals(keybinding: number): boolean;
431
- preventDefault(): void;
432
- stopPropagation(): void;
433
- }
434
- export interface IMouseEvent {
435
- readonly browserEvent: MouseEvent;
436
- readonly leftButton: boolean;
437
- readonly middleButton: boolean;
438
- readonly rightButton: boolean;
439
- readonly buttons: number;
440
- readonly target: HTMLElement;
441
- readonly detail: number;
442
- readonly posx: number;
443
- readonly posy: number;
444
- readonly ctrlKey: boolean;
445
- readonly shiftKey: boolean;
446
- readonly altKey: boolean;
447
- readonly metaKey: boolean;
448
- readonly timestamp: number;
449
- preventDefault(): void;
450
- stopPropagation(): void;
451
- }
452
-
453
- export interface IScrollEvent {
454
- readonly scrollTop: number;
455
- readonly scrollLeft: number;
456
- readonly scrollWidth: number;
457
- readonly scrollHeight: number;
458
- readonly scrollTopChanged: boolean;
459
- readonly scrollLeftChanged: boolean;
460
- readonly scrollWidthChanged: boolean;
461
- readonly scrollHeightChanged: boolean;
462
- }
463
- /**
464
- * A position in the editor. This interface is suitable for serialization.
465
- */
466
- export interface IPosition {
467
- /**
468
- * line number (starts at 1)
469
- */
470
- readonly lineNumber: number;
471
- /**
472
- * column (the first character in a line is between column 1 and column 2)
473
- */
474
- readonly column: number;
475
- }
417
+ export interface IKeyboardEvent {
418
+ readonly _standardKeyboardEventBrand: true;
419
+ readonly browserEvent: KeyboardEvent;
420
+ readonly target: HTMLElement;
421
+ readonly ctrlKey: boolean;
422
+ readonly shiftKey: boolean;
423
+ readonly altKey: boolean;
424
+ readonly metaKey: boolean;
425
+ readonly keyCode: KeyCode;
426
+ readonly code: string;
427
+ equals(keybinding: number): boolean;
428
+ preventDefault(): void;
429
+ stopPropagation(): void;
430
+ }
431
+ export interface IMouseEvent {
432
+ readonly browserEvent: MouseEvent;
433
+ readonly leftButton: boolean;
434
+ readonly middleButton: boolean;
435
+ readonly rightButton: boolean;
436
+ readonly buttons: number;
437
+ readonly target: HTMLElement;
438
+ readonly detail: number;
439
+ readonly posx: number;
440
+ readonly posy: number;
441
+ readonly ctrlKey: boolean;
442
+ readonly shiftKey: boolean;
443
+ readonly altKey: boolean;
444
+ readonly metaKey: boolean;
445
+ readonly timestamp: number;
446
+ preventDefault(): void;
447
+ stopPropagation(): void;
448
+ }
476
449
 
450
+ export interface IScrollEvent {
451
+ readonly scrollTop: number;
452
+ readonly scrollLeft: number;
453
+ readonly scrollWidth: number;
454
+ readonly scrollHeight: number;
455
+ readonly scrollTopChanged: boolean;
456
+ readonly scrollLeftChanged: boolean;
457
+ readonly scrollWidthChanged: boolean;
458
+ readonly scrollHeightChanged: boolean;
459
+ }
460
+ /**
461
+ * A position in the editor. This interface is suitable for serialization.
462
+ */
463
+ export interface IPosition {
477
464
  /**
478
- * A position in the editor.
465
+ * line number (starts at 1)
479
466
  */
480
- export class Position {
481
- /**
482
- * line number (starts at 1)
483
- */
484
- readonly lineNumber: number;
485
- /**
486
- * column (the first character in a line is between column 1 and column 2)
487
- */
488
- readonly column: number;
489
- constructor(lineNumber: number, column: number);
490
- /**
491
- * Create a new position from this position.
492
- *
493
- * @param newLineNumber new line number
494
- * @param newColumn new column
495
- */
496
- with(newLineNumber?: number, newColumn?: number): Position;
497
- /**
498
- * Derive a new position from this position.
499
- *
500
- * @param deltaLineNumber line number delta
501
- * @param deltaColumn column delta
502
- */
503
- delta(deltaLineNumber?: number, deltaColumn?: number): Position;
504
- /**
505
- * Test if this position equals other position
506
- */
507
- equals(other: IPosition): boolean;
508
- /**
509
- * Test if position `a` equals position `b`
510
- */
511
- static equals(a: IPosition | null, b: IPosition | null): boolean;
512
- /**
513
- * Test if this position is before other position.
514
- * If the two positions are equal, the result will be false.
515
- */
516
- isBefore(other: IPosition): boolean;
517
- /**
518
- * Test if position `a` is before position `b`.
519
- * If the two positions are equal, the result will be false.
520
- */
521
- static isBefore(a: IPosition, b: IPosition): boolean;
522
- /**
523
- * Test if this position is before other position.
524
- * If the two positions are equal, the result will be true.
525
- */
526
- isBeforeOrEqual(other: IPosition): boolean;
527
- /**
528
- * Test if position `a` is before position `b`.
529
- * If the two positions are equal, the result will be true.
530
- */
531
- static isBeforeOrEqual(a: IPosition, b: IPosition): boolean;
532
- /**
533
- * A function that compares positions, useful for sorting
534
- */
535
- static compare(a: IPosition, b: IPosition): number;
536
- /**
537
- * Clone this position.
538
- */
539
- clone(): Position;
540
- /**
541
- * Convert to a human-readable representation.
542
- */
543
- toString(): string;
544
- /**
545
- * Create a `Position` from an `IPosition`.
546
- */
547
- static lift(pos: IPosition): Position;
548
- /**
549
- * Test if `obj` is an `IPosition`.
550
- */
551
- static isIPosition(obj: any): obj is IPosition;
552
- }
467
+ readonly lineNumber: number;
468
+ /**
469
+ * column (the first character in a line is between column 1 and column 2)
470
+ */
471
+ readonly column: number;
472
+ }
553
473
 
474
+ /**
475
+ * A position in the editor.
476
+ */
477
+ export class Position {
554
478
  /**
555
- * A range in the editor. This interface is suitable for serialization.
479
+ * line number (starts at 1)
556
480
  */
557
- export interface IRange {
558
- /**
559
- * Line number on which the range starts (starts at 1).
560
- */
561
- readonly startLineNumber: number;
562
- /**
563
- * Column on which the range starts in line `startLineNumber` (starts at 1).
564
- */
565
- readonly startColumn: number;
566
- /**
567
- * Line number on which the range ends.
568
- */
569
- readonly endLineNumber: number;
570
- /**
571
- * Column on which the range ends in line `endLineNumber`.
572
- */
573
- readonly endColumn: number;
574
- }
481
+ readonly lineNumber: number;
482
+ /**
483
+ * column (the first character in a line is between column 1 and column 2)
484
+ */
485
+ readonly column: number;
486
+ constructor(lineNumber: number, column: number);
487
+ /**
488
+ * Create a new position from this position.
489
+ *
490
+ * @param newLineNumber new line number
491
+ * @param newColumn new column
492
+ */
493
+ with(newLineNumber?: number, newColumn?: number): Position;
494
+ /**
495
+ * Derive a new position from this position.
496
+ *
497
+ * @param deltaLineNumber line number delta
498
+ * @param deltaColumn column delta
499
+ */
500
+ delta(deltaLineNumber?: number, deltaColumn?: number): Position;
501
+ /**
502
+ * Test if this position equals other position
503
+ */
504
+ equals(other: IPosition): boolean;
505
+ /**
506
+ * Test if position `a` equals position `b`
507
+ */
508
+ static equals(a: IPosition | null, b: IPosition | null): boolean;
509
+ /**
510
+ * Test if this position is before other position.
511
+ * If the two positions are equal, the result will be false.
512
+ */
513
+ isBefore(other: IPosition): boolean;
514
+ /**
515
+ * Test if position `a` is before position `b`.
516
+ * If the two positions are equal, the result will be false.
517
+ */
518
+ static isBefore(a: IPosition, b: IPosition): boolean;
519
+ /**
520
+ * Test if this position is before other position.
521
+ * If the two positions are equal, the result will be true.
522
+ */
523
+ isBeforeOrEqual(other: IPosition): boolean;
524
+ /**
525
+ * Test if position `a` is before position `b`.
526
+ * If the two positions are equal, the result will be true.
527
+ */
528
+ static isBeforeOrEqual(a: IPosition, b: IPosition): boolean;
529
+ /**
530
+ * A function that compares positions, useful for sorting
531
+ */
532
+ static compare(a: IPosition, b: IPosition): number;
533
+ /**
534
+ * Clone this position.
535
+ */
536
+ clone(): Position;
537
+ /**
538
+ * Convert to a human-readable representation.
539
+ */
540
+ toString(): string;
541
+ /**
542
+ * Create a `Position` from an `IPosition`.
543
+ */
544
+ static lift(pos: IPosition): Position;
545
+ /**
546
+ * Test if `obj` is an `IPosition`.
547
+ */
548
+ static isIPosition(obj: any): obj is IPosition;
549
+ }
575
550
 
551
+ /**
552
+ * A range in the editor. This interface is suitable for serialization.
553
+ */
554
+ export interface IRange {
576
555
  /**
577
- * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)
556
+ * Line number on which the range starts (starts at 1).
578
557
  */
579
- export class Range {
580
- /**
581
- * Line number on which the range starts (starts at 1).
582
- */
583
- readonly startLineNumber: number;
584
- /**
585
- * Column on which the range starts in line `startLineNumber` (starts at 1).
586
- */
587
- readonly startColumn: number;
588
- /**
589
- * Line number on which the range ends.
590
- */
591
- readonly endLineNumber: number;
592
- /**
593
- * Column on which the range ends in line `endLineNumber`.
594
- */
595
- readonly endColumn: number;
596
- constructor(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number);
597
- /**
598
- * Test if this range is empty.
599
- */
600
- isEmpty(): boolean;
601
- /**
602
- * Test if `range` is empty.
603
- */
604
- static isEmpty(range: IRange): boolean;
605
- /**
606
- * Test if position is in this range. If the position is at the edges, will return true.
607
- */
608
- containsPosition(position: IPosition): boolean;
609
- /**
610
- * Test if `position` is in `range`. If the position is at the edges, will return true.
611
- */
612
- static containsPosition(range: IRange, position: IPosition): boolean;
613
- /**
614
- * Test if range is in this range. If the range is equal to this range, will return true.
615
- */
616
- containsRange(range: IRange): boolean;
617
- /**
618
- * Test if `otherRange` is in `range`. If the ranges are equal, will return true.
619
- */
620
- static containsRange(range: IRange, otherRange: IRange): boolean;
621
- /**
622
- * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.
623
- */
624
- strictContainsRange(range: IRange): boolean;
625
- /**
626
- * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
627
- */
628
- static strictContainsRange(range: IRange, otherRange: IRange): boolean;
629
- /**
630
- * A reunion of the two ranges.
631
- * The smallest position will be used as the start point, and the largest one as the end point.
632
- */
633
- plusRange(range: IRange): Range;
634
- /**
635
- * A reunion of the two ranges.
636
- * The smallest position will be used as the start point, and the largest one as the end point.
637
- */
638
- static plusRange(a: IRange, b: IRange): Range;
639
- /**
640
- * A intersection of the two ranges.
641
- */
642
- intersectRanges(range: IRange): Range | null;
643
- /**
644
- * A intersection of the two ranges.
645
- */
646
- static intersectRanges(a: IRange, b: IRange): Range | null;
647
- /**
648
- * Test if this range equals other.
649
- */
650
- equalsRange(other: IRange | null): boolean;
651
- /**
652
- * Test if range `a` equals `b`.
653
- */
654
- static equalsRange(a: IRange | null, b: IRange | null): boolean;
655
- /**
656
- * Return the end position (which will be after or equal to the start position)
657
- */
658
- getEndPosition(): Position;
659
- /**
660
- * Return the end position (which will be after or equal to the start position)
661
- */
662
- static getEndPosition(range: IRange): Position;
663
- /**
664
- * Return the start position (which will be before or equal to the end position)
665
- */
666
- getStartPosition(): Position;
667
- /**
668
- * Return the start position (which will be before or equal to the end position)
669
- */
670
- static getStartPosition(range: IRange): Position;
671
- /**
672
- * Transform to a user presentable string representation.
673
- */
674
- toString(): string;
675
- /**
676
- * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
677
- */
678
- setEndPosition(endLineNumber: number, endColumn: number): Range;
679
- /**
680
- * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
681
- */
682
- setStartPosition(startLineNumber: number, startColumn: number): Range;
683
- /**
684
- * Create a new empty range using this range's start position.
685
- */
686
- collapseToStart(): Range;
687
- /**
688
- * Create a new empty range using this range's start position.
689
- */
690
- static collapseToStart(range: IRange): Range;
691
- static fromPositions(start: IPosition, end?: IPosition): Range;
692
- /**
693
- * Create a `Range` from an `IRange`.
694
- */
695
- static lift(range: undefined | null): null;
696
- static lift(range: IRange): Range;
697
- /**
698
- * Test if `obj` is an `IRange`.
699
- */
700
- static isIRange(obj: any): obj is IRange;
701
- /**
702
- * Test if the two ranges are touching in any way.
703
- */
704
- static areIntersectingOrTouching(a: IRange, b: IRange): boolean;
705
- /**
706
- * Test if the two ranges are intersecting. If the ranges are touching it returns true.
707
- */
708
- static areIntersecting(a: IRange, b: IRange): boolean;
709
- /**
710
- * A function that compares ranges, useful for sorting ranges
711
- * It will first compare ranges on the startPosition and then on the endPosition
712
- */
713
- static compareRangesUsingStarts(a: IRange | null | undefined, b: IRange | null | undefined): number;
714
- /**
715
- * A function that compares ranges, useful for sorting ranges
716
- * It will first compare ranges on the endPosition and then on the startPosition
717
- */
718
- static compareRangesUsingEnds(a: IRange, b: IRange): number;
719
- /**
720
- * Test if the range spans multiple lines.
721
- */
722
- static spansMultipleLines(range: IRange): boolean;
723
- }
558
+ readonly startLineNumber: number;
559
+ /**
560
+ * Column on which the range starts in line `startLineNumber` (starts at 1).
561
+ */
562
+ readonly startColumn: number;
563
+ /**
564
+ * Line number on which the range ends.
565
+ */
566
+ readonly endLineNumber: number;
567
+ /**
568
+ * Column on which the range ends in line `endLineNumber`.
569
+ */
570
+ readonly endColumn: number;
571
+ }
724
572
 
573
+ /**
574
+ * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)
575
+ */
576
+ export class Range {
725
577
  /**
726
- * A selection in the editor.
727
- * The selection is a range that has an orientation.
578
+ * Line number on which the range starts (starts at 1).
728
579
  */
729
- export interface ISelection {
730
- /**
731
- * The line number on which the selection has started.
732
- */
733
- readonly selectionStartLineNumber: number;
734
- /**
735
- * The column on `selectionStartLineNumber` where the selection has started.
736
- */
737
- readonly selectionStartColumn: number;
738
- /**
739
- * The line number on which the selection has ended.
740
- */
741
- readonly positionLineNumber: number;
742
- /**
743
- * The column on `positionLineNumber` where the selection has ended.
744
- */
745
- readonly positionColumn: number;
746
- }
580
+ readonly startLineNumber: number;
581
+ /**
582
+ * Column on which the range starts in line `startLineNumber` (starts at 1).
583
+ */
584
+ readonly startColumn: number;
585
+ /**
586
+ * Line number on which the range ends.
587
+ */
588
+ readonly endLineNumber: number;
589
+ /**
590
+ * Column on which the range ends in line `endLineNumber`.
591
+ */
592
+ readonly endColumn: number;
593
+ constructor(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number);
594
+ /**
595
+ * Test if this range is empty.
596
+ */
597
+ isEmpty(): boolean;
598
+ /**
599
+ * Test if `range` is empty.
600
+ */
601
+ static isEmpty(range: IRange): boolean;
602
+ /**
603
+ * Test if position is in this range. If the position is at the edges, will return true.
604
+ */
605
+ containsPosition(position: IPosition): boolean;
606
+ /**
607
+ * Test if `position` is in `range`. If the position is at the edges, will return true.
608
+ */
609
+ static containsPosition(range: IRange, position: IPosition): boolean;
610
+ /**
611
+ * Test if range is in this range. If the range is equal to this range, will return true.
612
+ */
613
+ containsRange(range: IRange): boolean;
614
+ /**
615
+ * Test if `otherRange` is in `range`. If the ranges are equal, will return true.
616
+ */
617
+ static containsRange(range: IRange, otherRange: IRange): boolean;
618
+ /**
619
+ * Test if `range` is strictly in this range. `range` must start after and end before this range for the result to be true.
620
+ */
621
+ strictContainsRange(range: IRange): boolean;
622
+ /**
623
+ * Test if `otherRange` is strictly in `range` (must start after, and end before). If the ranges are equal, will return false.
624
+ */
625
+ static strictContainsRange(range: IRange, otherRange: IRange): boolean;
626
+ /**
627
+ * A reunion of the two ranges.
628
+ * The smallest position will be used as the start point, and the largest one as the end point.
629
+ */
630
+ plusRange(range: IRange): Range;
631
+ /**
632
+ * A reunion of the two ranges.
633
+ * The smallest position will be used as the start point, and the largest one as the end point.
634
+ */
635
+ static plusRange(a: IRange, b: IRange): Range;
636
+ /**
637
+ * A intersection of the two ranges.
638
+ */
639
+ intersectRanges(range: IRange): Range | null;
640
+ /**
641
+ * A intersection of the two ranges.
642
+ */
643
+ static intersectRanges(a: IRange, b: IRange): Range | null;
644
+ /**
645
+ * Test if this range equals other.
646
+ */
647
+ equalsRange(other: IRange | null): boolean;
648
+ /**
649
+ * Test if range `a` equals `b`.
650
+ */
651
+ static equalsRange(a: IRange | null, b: IRange | null): boolean;
652
+ /**
653
+ * Return the end position (which will be after or equal to the start position)
654
+ */
655
+ getEndPosition(): Position;
656
+ /**
657
+ * Return the end position (which will be after or equal to the start position)
658
+ */
659
+ static getEndPosition(range: IRange): Position;
660
+ /**
661
+ * Return the start position (which will be before or equal to the end position)
662
+ */
663
+ getStartPosition(): Position;
664
+ /**
665
+ * Return the start position (which will be before or equal to the end position)
666
+ */
667
+ static getStartPosition(range: IRange): Position;
668
+ /**
669
+ * Transform to a user presentable string representation.
670
+ */
671
+ toString(): string;
672
+ /**
673
+ * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
674
+ */
675
+ setEndPosition(endLineNumber: number, endColumn: number): Range;
676
+ /**
677
+ * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
678
+ */
679
+ setStartPosition(startLineNumber: number, startColumn: number): Range;
680
+ /**
681
+ * Create a new empty range using this range's start position.
682
+ */
683
+ collapseToStart(): Range;
684
+ /**
685
+ * Create a new empty range using this range's start position.
686
+ */
687
+ static collapseToStart(range: IRange): Range;
688
+ static fromPositions(start: IPosition, end?: IPosition): Range;
689
+ /**
690
+ * Create a `Range` from an `IRange`.
691
+ */
692
+ static lift(range: undefined | null): null;
693
+ static lift(range: IRange): Range;
694
+ /**
695
+ * Test if `obj` is an `IRange`.
696
+ */
697
+ static isIRange(obj: any): obj is IRange;
698
+ /**
699
+ * Test if the two ranges are touching in any way.
700
+ */
701
+ static areIntersectingOrTouching(a: IRange, b: IRange): boolean;
702
+ /**
703
+ * Test if the two ranges are intersecting. If the ranges are touching it returns true.
704
+ */
705
+ static areIntersecting(a: IRange, b: IRange): boolean;
706
+ /**
707
+ * A function that compares ranges, useful for sorting ranges
708
+ * It will first compare ranges on the startPosition and then on the endPosition
709
+ */
710
+ static compareRangesUsingStarts(a: IRange | null | undefined, b: IRange | null | undefined): number;
711
+ /**
712
+ * A function that compares ranges, useful for sorting ranges
713
+ * It will first compare ranges on the endPosition and then on the startPosition
714
+ */
715
+ static compareRangesUsingEnds(a: IRange, b: IRange): number;
716
+ /**
717
+ * Test if the range spans multiple lines.
718
+ */
719
+ static spansMultipleLines(range: IRange): boolean;
720
+ }
747
721
 
722
+ /**
723
+ * A selection in the editor.
724
+ * The selection is a range that has an orientation.
725
+ */
726
+ export interface ISelection {
748
727
  /**
749
- * A selection in the editor.
750
- * The selection is a range that has an orientation.
728
+ * The line number on which the selection has started.
751
729
  */
752
- export class Selection extends Range {
753
- /**
754
- * The line number on which the selection has started.
755
- */
756
- readonly selectionStartLineNumber: number;
757
- /**
758
- * The column on `selectionStartLineNumber` where the selection has started.
759
- */
760
- readonly selectionStartColumn: number;
761
- /**
762
- * The line number on which the selection has ended.
763
- */
764
- readonly positionLineNumber: number;
765
- /**
766
- * The column on `positionLineNumber` where the selection has ended.
767
- */
768
- readonly positionColumn: number;
769
- constructor(selectionStartLineNumber: number, selectionStartColumn: number, positionLineNumber: number, positionColumn: number);
770
- /**
771
- * Transform to a human-readable representation.
772
- */
773
- toString(): string;
774
- /**
775
- * Test if equals other selection.
776
- */
777
- equalsSelection(other: ISelection): boolean;
778
- /**
779
- * Test if the two selections are equal.
780
- */
781
- static selectionsEqual(a: ISelection, b: ISelection): boolean;
782
- /**
783
- * Get directions (LTR or RTL).
784
- */
785
- getDirection(): SelectionDirection;
786
- /**
787
- * Create a new selection with a different `positionLineNumber` and `positionColumn`.
788
- */
789
- setEndPosition(endLineNumber: number, endColumn: number): Selection;
790
- /**
791
- * Get the position at `positionLineNumber` and `positionColumn`.
792
- */
793
- getPosition(): Position;
794
- /**
795
- * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
796
- */
797
- setStartPosition(startLineNumber: number, startColumn: number): Selection;
798
- /**
799
- * Create a `Selection` from one or two positions
800
- */
801
- static fromPositions(start: IPosition, end?: IPosition): Selection;
802
- /**
803
- * Create a `Selection` from an `ISelection`.
804
- */
805
- static liftSelection(sel: ISelection): Selection;
806
- /**
807
- * `a` equals `b`.
808
- */
809
- static selectionsArrEqual(a: ISelection[], b: ISelection[]): boolean;
810
- /**
811
- * Test if `obj` is an `ISelection`.
812
- */
813
- static isISelection(obj: any): obj is ISelection;
814
- /**
815
- * Create with a direction.
816
- */
817
- static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;
818
- }
730
+ readonly selectionStartLineNumber: number;
731
+ /**
732
+ * The column on `selectionStartLineNumber` where the selection has started.
733
+ */
734
+ readonly selectionStartColumn: number;
735
+ /**
736
+ * The line number on which the selection has ended.
737
+ */
738
+ readonly positionLineNumber: number;
739
+ /**
740
+ * The column on `positionLineNumber` where the selection has ended.
741
+ */
742
+ readonly positionColumn: number;
743
+ }
819
744
 
745
+ /**
746
+ * A selection in the editor.
747
+ * The selection is a range that has an orientation.
748
+ */
749
+ export class Selection extends Range {
820
750
  /**
821
- * The direction of a selection.
751
+ * The line number on which the selection has started.
822
752
  */
823
- export enum SelectionDirection {
824
- /**
825
- * The selection starts above where it ends.
826
- */
827
- LTR = 0,
828
- /**
829
- * The selection starts below where it ends.
830
- */
831
- RTL = 1
832
- }
753
+ readonly selectionStartLineNumber: number;
754
+ /**
755
+ * The column on `selectionStartLineNumber` where the selection has started.
756
+ */
757
+ readonly selectionStartColumn: number;
758
+ /**
759
+ * The line number on which the selection has ended.
760
+ */
761
+ readonly positionLineNumber: number;
762
+ /**
763
+ * The column on `positionLineNumber` where the selection has ended.
764
+ */
765
+ readonly positionColumn: number;
766
+ constructor(selectionStartLineNumber: number, selectionStartColumn: number, positionLineNumber: number, positionColumn: number);
767
+ /**
768
+ * Transform to a human-readable representation.
769
+ */
770
+ toString(): string;
771
+ /**
772
+ * Test if equals other selection.
773
+ */
774
+ equalsSelection(other: ISelection): boolean;
775
+ /**
776
+ * Test if the two selections are equal.
777
+ */
778
+ static selectionsEqual(a: ISelection, b: ISelection): boolean;
779
+ /**
780
+ * Get directions (LTR or RTL).
781
+ */
782
+ getDirection(): SelectionDirection;
783
+ /**
784
+ * Create a new selection with a different `positionLineNumber` and `positionColumn`.
785
+ */
786
+ setEndPosition(endLineNumber: number, endColumn: number): Selection;
787
+ /**
788
+ * Get the position at `positionLineNumber` and `positionColumn`.
789
+ */
790
+ getPosition(): Position;
791
+ /**
792
+ * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`.
793
+ */
794
+ setStartPosition(startLineNumber: number, startColumn: number): Selection;
795
+ /**
796
+ * Create a `Selection` from one or two positions
797
+ */
798
+ static fromPositions(start: IPosition, end?: IPosition): Selection;
799
+ /**
800
+ * Create a `Selection` from an `ISelection`.
801
+ */
802
+ static liftSelection(sel: ISelection): Selection;
803
+ /**
804
+ * `a` equals `b`.
805
+ */
806
+ static selectionsArrEqual(a: ISelection[], b: ISelection[]): boolean;
807
+ /**
808
+ * Test if `obj` is an `ISelection`.
809
+ */
810
+ static isISelection(obj: any): obj is ISelection;
811
+ /**
812
+ * Create with a direction.
813
+ */
814
+ static createWithDirection(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, direction: SelectionDirection): Selection;
815
+ }
833
816
 
834
- export class Token {
835
- _tokenBrand: void;
836
- readonly offset: number;
837
- readonly type: string;
838
- readonly language: string;
839
- constructor(offset: number, type: string, language: string);
840
- toString(): string;
841
- }
817
+ /**
818
+ * The direction of a selection.
819
+ */
820
+ export enum SelectionDirection {
821
+ /**
822
+ * The selection starts above where it ends.
823
+ */
824
+ LTR = 0,
825
+ /**
826
+ * The selection starts below where it ends.
827
+ */
828
+ RTL = 1
829
+ }
830
+
831
+ export class Token {
832
+ _tokenBrand: void;
833
+ readonly offset: number;
834
+ readonly type: string;
835
+ readonly language: string;
836
+ constructor(offset: number, type: string, language: string);
837
+ toString(): string;
842
838
  }
843
839
 
844
- declare namespace monaco.editor {
840
+ export namespace editor {
845
841
 
846
842
  export interface IDiffNavigator {
847
843
  canNavigate(): boolean;
@@ -5195,7 +5191,7 @@ declare namespace monaco.editor {
5195
5191
  export type IModel = ITextModel;
5196
5192
  }
5197
5193
 
5198
- declare namespace monaco.languages {
5194
+ export namespace languages {
5199
5195
 
5200
5196
  /**
5201
5197
  * Register information about a new language.
@@ -6872,7 +6868,7 @@ declare namespace monaco.languages {
6872
6868
 
6873
6869
  }
6874
6870
 
6875
- declare namespace monaco.worker {
6871
+ export namespace worker {
6876
6872
 
6877
6873
  export interface IMirrorTextModel {
6878
6874
  readonly version: number;