@codingame/monaco-vscode-api 1.68.7 → 1.69.2

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.
@@ -0,0 +1,683 @@
1
+ import * as monaco from 'monaco-editor';
2
+ import * as vscode from 'vscode';
3
+ import { IGrammar as IGrammar$1 } from 'vscode-textmate';
4
+
5
+ /**
6
+ * Identifies a service of type `T`.
7
+ */
8
+ interface ServiceIdentifier<T> {
9
+ (...args: any[]): void;
10
+ type: T;
11
+ }
12
+
13
+ interface IDisposable {
14
+ dispose(): void;
15
+ }
16
+ declare class DisposableStore implements IDisposable {
17
+ static DISABLE_DISPOSED_WARNING: boolean;
18
+ private _toDispose;
19
+ private _isDisposed;
20
+ constructor();
21
+ /**
22
+ * Dispose of all registered disposables and mark this object as disposed.
23
+ *
24
+ * Any future disposables added to this object will be disposed of on `add`.
25
+ */
26
+ dispose(): void;
27
+ /**
28
+ * Returns `true` if this object has been disposed
29
+ */
30
+ get isDisposed(): boolean;
31
+ /**
32
+ * Dispose of all registered disposables but do not mark this object as disposed.
33
+ */
34
+ clear(): void;
35
+ add<T extends IDisposable>(o: T): T;
36
+ }
37
+
38
+ interface IObservable<T, TChange = void> {
39
+ readonly TChange: TChange;
40
+ /**
41
+ * Reads the current value.
42
+ *
43
+ * Must not be called from {@link IObserver.handleChange}.
44
+ */
45
+ get(): T;
46
+ /**
47
+ * Adds an observer.
48
+ */
49
+ addObserver(observer: IObserver): void;
50
+ removeObserver(observer: IObserver): void;
51
+ /**
52
+ * Subscribes the reader to this observable and returns the current value of this observable.
53
+ */
54
+ read(reader: IReader): T;
55
+ map<TNew>(fn: (value: T) => TNew): IObservable<TNew>;
56
+ readonly debugName: string;
57
+ }
58
+ interface IReader {
59
+ /**
60
+ * Reports an observable that was read.
61
+ *
62
+ * Is called by {@link IObservable.read}.
63
+ */
64
+ subscribeTo<T>(observable: IObservable<T, any>): void;
65
+ }
66
+ interface IObserver {
67
+ /**
68
+ * Indicates that an update operation is about to begin.
69
+ *
70
+ * During an update, invariants might not hold for subscribed observables and
71
+ * change events might be delayed.
72
+ * However, all changes must be reported before all update operations are over.
73
+ */
74
+ beginUpdate<T>(observable: IObservable<T>): void;
75
+ /**
76
+ * Is called by a subscribed observable immediately after it notices a change.
77
+ *
78
+ * When {@link IObservable.get} returns and no change has been reported,
79
+ * there has been no change for that observable.
80
+ *
81
+ * Implementations must not call into other observables!
82
+ * The change should be processed when {@link IObserver.endUpdate} is called.
83
+ */
84
+ handleChange<T, TChange>(observable: IObservable<T, TChange>, change: TChange): void;
85
+ /**
86
+ * Indicates that an update operation has completed.
87
+ */
88
+ endUpdate<T>(observable: IObservable<T>): void;
89
+ }
90
+
91
+ /**
92
+ * To an event a function with one or zero parameters
93
+ * can be subscribed. The event is the subscriber function itself.
94
+ */
95
+ type Event<T> = vscode.Event<T>
96
+ declare namespace Event {
97
+ const None: Event<any>;
98
+ /**
99
+ * Given an event, returns another event which only fires once.
100
+ */
101
+ function once<T>(event: Event<T>): Event<T>;
102
+ /**
103
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
104
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
105
+ * returned event causes this utility to leak a listener on the original event.
106
+ */
107
+ function map<I, O>(event: Event<I>, map: (i: I) => O, disposable?: DisposableStore): Event<O>;
108
+ /**
109
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
110
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
111
+ * returned event causes this utility to leak a listener on the original event.
112
+ */
113
+ function forEach<I>(event: Event<I>, each: (i: I) => void, disposable?: DisposableStore): Event<I>;
114
+ /**
115
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
116
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
117
+ * returned event causes this utility to leak a listener on the original event.
118
+ */
119
+ function filter<T, U>(event: Event<T | U>, filter: (e: T | U) => e is T, disposable?: DisposableStore): Event<T>;
120
+ function filter<T>(event: Event<T>, filter: (e: T) => boolean, disposable?: DisposableStore): Event<T>;
121
+ function filter<T, R>(event: Event<T | R>, filter: (e: T | R) => e is R, disposable?: DisposableStore): Event<R>;
122
+ /**
123
+ * Given an event, returns the same event but typed as `Event<void>`.
124
+ */
125
+ function signal<T>(event: Event<T>): Event<void>;
126
+ /**
127
+ * Given a collection of events, returns a single event which emits
128
+ * whenever any of the provided events emit.
129
+ */
130
+ function any<T>(...events: Event<T>[]): Event<T>;
131
+ function any(...events: Event<any>[]): Event<void>;
132
+ /**
133
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
134
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
135
+ * returned event causes this utility to leak a listener on the original event.
136
+ */
137
+ function reduce<I, O>(event: Event<I>, merge: (last: O | undefined, event: I) => O, initial?: O, disposable?: DisposableStore): Event<O>;
138
+ /**
139
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
140
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
141
+ * returned event causes this utility to leak a listener on the original event.
142
+ */
143
+ function debounce<T>(event: Event<T>, merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, leakWarningThreshold?: number, disposable?: DisposableStore): Event<T>;
144
+ /**
145
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
146
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
147
+ * returned event causes this utility to leak a listener on the original event.
148
+ */
149
+ function debounce<I, O>(event: Event<I>, merge: (last: O | undefined, event: I) => O, delay?: number, leading?: boolean, leakWarningThreshold?: number, disposable?: DisposableStore): Event<O>;
150
+ /**
151
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
152
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
153
+ * returned event causes this utility to leak a listener on the original event.
154
+ */
155
+ function latch<T>(event: Event<T>, equals?: (a: T, b: T) => boolean, disposable?: DisposableStore): Event<T>;
156
+ /**
157
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
158
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
159
+ * returned event causes this utility to leak a listener on the original event.
160
+ */
161
+ function split<T, U>(event: Event<T | U>, isT: (e: T | U) => e is T, disposable?: DisposableStore): [Event<T>, Event<U>];
162
+ /**
163
+ * *NOTE* that this function returns an `Event` and it MUST be called with a `DisposableStore` whenever the returned
164
+ * event is accessible to "third parties", e.g the event is a public property. Otherwise a leaked listener on the
165
+ * returned event causes this utility to leak a listener on the original event.
166
+ */
167
+ function buffer<T>(event: Event<T>, flushAfterTimeout?: boolean, _buffer?: T[]): Event<T>;
168
+ interface IChainableEvent<T> extends IDisposable {
169
+ event: Event<T>;
170
+ map<O>(fn: (i: T) => O): IChainableEvent<O>;
171
+ forEach(fn: (i: T) => void): IChainableEvent<T>;
172
+ filter(fn: (e: T) => boolean): IChainableEvent<T>;
173
+ filter<R>(fn: (e: T | R) => e is R): IChainableEvent<R>;
174
+ reduce<R>(merge: (last: R | undefined, event: T) => R, initial?: R): IChainableEvent<R>;
175
+ latch(): IChainableEvent<T>;
176
+ debounce(merge: (last: T | undefined, event: T) => T, delay?: number, leading?: boolean, leakWarningThreshold?: number): IChainableEvent<T>;
177
+ debounce<R>(merge: (last: R | undefined, event: T) => R, delay?: number, leading?: boolean, leakWarningThreshold?: number): IChainableEvent<R>;
178
+ on(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable;
179
+ once(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable;
180
+ }
181
+ function chain<T>(event: Event<T>): IChainableEvent<T>;
182
+ interface NodeEventEmitter {
183
+ on(event: string | symbol, listener: Function): unknown;
184
+ removeListener(event: string | symbol, listener: Function): unknown;
185
+ }
186
+ function fromNodeEventEmitter<T>(emitter: NodeEventEmitter, eventName: string, map?: (...args: any[]) => T): Event<T>;
187
+ interface DOMEventEmitter {
188
+ addEventListener(event: string | symbol, listener: Function): void;
189
+ removeEventListener(event: string | symbol, listener: Function): void;
190
+ }
191
+ function fromDOMEventEmitter<T>(emitter: DOMEventEmitter, eventName: string, map?: (...args: any[]) => T): Event<T>;
192
+ function toPromise<T>(event: Event<T>): Promise<T>;
193
+ function runAndSubscribe<T>(event: Event<T>, handler: (e: T | undefined) => any): IDisposable;
194
+ function runAndSubscribeWithStore<T>(event: Event<T>, handler: (e: T | undefined, disposableStore: DisposableStore) => any): IDisposable;
195
+ function fromObservable<T>(obs: IObservable<T, any>, store?: DisposableStore): Event<T>;
196
+ }
197
+
198
+ /**
199
+ * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
200
+ * This class is a simple parser which creates the basic component parts
201
+ * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
202
+ * and encoding.
203
+ *
204
+ * ```txt
205
+ * foo://example.com:8042/over/there?name=ferret#nose
206
+ * \_/ \______________/\_________/ \_________/ \__/
207
+ * | | | | |
208
+ * scheme authority path query fragment
209
+ * | _____________________|__
210
+ * / \ / \
211
+ * urn:example:animal:ferret:nose
212
+ * ```
213
+ */
214
+ declare class URI implements UriComponents {
215
+ static isUri(thing: any): thing is URI;
216
+ /**
217
+ * scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
218
+ * The part before the first colon.
219
+ */
220
+ readonly scheme: string;
221
+ /**
222
+ * authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.
223
+ * The part between the first double slashes and the next slash.
224
+ */
225
+ readonly authority: string;
226
+ /**
227
+ * path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.
228
+ */
229
+ readonly path: string;
230
+ /**
231
+ * query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.
232
+ */
233
+ readonly query: string;
234
+ /**
235
+ * fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.
236
+ */
237
+ readonly fragment: string;
238
+ /**
239
+ * @internal
240
+ */
241
+ protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);
242
+ /**
243
+ * @internal
244
+ */
245
+ protected constructor(components: UriComponents);
246
+ /**
247
+ * Returns a string representing the corresponding file system path of this URI.
248
+ * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
249
+ * platform specific path separator.
250
+ *
251
+ * * Will *not* validate the path for invalid characters and semantics.
252
+ * * Will *not* look at the scheme of this URI.
253
+ * * The result shall *not* be used for display purposes but for accessing a file on disk.
254
+ *
255
+ *
256
+ * The *difference* to `URI#path` is the use of the platform specific separator and the handling
257
+ * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
258
+ *
259
+ * ```ts
260
+ const u = URI.parse('file://server/c$/folder/file.txt')
261
+ u.authority === 'server'
262
+ u.path === '/shares/c$/file.txt'
263
+ u.fsPath === '\\server\c$\folder\file.txt'
264
+ ```
265
+ *
266
+ * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
267
+ * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
268
+ * with URIs that represent files on disk (`file` scheme).
269
+ */
270
+ get fsPath(): string;
271
+ with(change: {
272
+ scheme?: string;
273
+ authority?: string | null;
274
+ path?: string | null;
275
+ query?: string | null;
276
+ fragment?: string | null;
277
+ }): URI;
278
+ /**
279
+ * Creates a new URI from a string, e.g. `http://www.example.com/some/path`,
280
+ * `file:///usr/home`, or `scheme:with/path`.
281
+ *
282
+ * @param value A string which represents an URI (see `URI#toString`).
283
+ */
284
+ static parse(value: string, _strict?: boolean): URI;
285
+ /**
286
+ * Creates a new URI from a file system path, e.g. `c:\my\files`,
287
+ * `/usr/home`, or `\\server\share\some\path`.
288
+ *
289
+ * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
290
+ * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
291
+ * `URI.parse('file://' + path)` because the path might contain characters that are
292
+ * interpreted (# and ?). See the following sample:
293
+ * ```ts
294
+ const good = URI.file('/coding/c#/project1');
295
+ good.scheme === 'file';
296
+ good.path === '/coding/c#/project1';
297
+ good.fragment === '';
298
+ const bad = URI.parse('file://' + '/coding/c#/project1');
299
+ bad.scheme === 'file';
300
+ bad.path === '/coding/c'; // path is now broken
301
+ bad.fragment === '/project1';
302
+ ```
303
+ *
304
+ * @param path A file system path (see `URI#fsPath`)
305
+ */
306
+ static file(path: string): URI;
307
+ static from(components: {
308
+ scheme: string;
309
+ authority?: string;
310
+ path?: string;
311
+ query?: string;
312
+ fragment?: string;
313
+ }): URI;
314
+ /**
315
+ * Join a URI path with path fragments and normalizes the resulting path.
316
+ *
317
+ * @param uri The input URI.
318
+ * @param pathFragment The path fragment to add to the URI path.
319
+ * @returns The resulting URI.
320
+ */
321
+ static joinPath(uri: URI, ...pathFragment: string[]): URI;
322
+ /**
323
+ * Creates a string representation for this URI. It's guaranteed that calling
324
+ * `URI.parse` with the result of this function creates an URI which is equal
325
+ * to this URI.
326
+ *
327
+ * * The result shall *not* be used for display purposes but for externalization or transport.
328
+ * * The result will be encoded using the percentage encoding and encoding happens mostly
329
+ * ignore the scheme-specific encoding rules.
330
+ *
331
+ * @param skipEncoding Do not encode the result, default is `false`
332
+ */
333
+ toString(skipEncoding?: boolean): string;
334
+ toJSON(): UriComponents;
335
+ static revive(data: UriComponents | URI): URI;
336
+ static revive(data: UriComponents | URI | undefined): URI | undefined;
337
+ static revive(data: UriComponents | URI | null): URI | null;
338
+ static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
339
+ }
340
+ interface UriComponents {
341
+ scheme: string;
342
+ authority: string;
343
+ path: string;
344
+ query: string;
345
+ fragment: string;
346
+ }
347
+
348
+ /**
349
+ * Type of extension.
350
+ *
351
+ * **NOTE**: This is defined in `platform/environment` because it can appear as a CLI argument.
352
+ */
353
+ declare type ExtensionKind = 'ui' | 'workspace' | 'web';
354
+
355
+ interface ICommand {
356
+ command: string;
357
+ title: string;
358
+ category?: string;
359
+ }
360
+ interface IConfigurationProperty {
361
+ description: string;
362
+ type: string | string[];
363
+ default?: any;
364
+ }
365
+ interface IConfiguration {
366
+ id?: string;
367
+ order?: number;
368
+ title?: string;
369
+ properties: {
370
+ [key: string]: IConfigurationProperty;
371
+ };
372
+ }
373
+ interface IDebugger {
374
+ label?: string;
375
+ type: string;
376
+ runtime?: string;
377
+ }
378
+ interface IGrammar {
379
+ language: string;
380
+ }
381
+ interface IJSONValidation {
382
+ fileMatch: string | string[];
383
+ url: string;
384
+ }
385
+ interface IKeyBinding {
386
+ command: string;
387
+ key: string;
388
+ when?: string;
389
+ mac?: string;
390
+ linux?: string;
391
+ win?: string;
392
+ }
393
+ interface ILanguage {
394
+ id: string;
395
+ extensions: string[];
396
+ aliases: string[];
397
+ }
398
+ interface IMenu {
399
+ command: string;
400
+ alt?: string;
401
+ when?: string;
402
+ group?: string;
403
+ }
404
+ interface ISnippet {
405
+ language: string;
406
+ }
407
+ interface ITheme {
408
+ label: string;
409
+ }
410
+ interface IViewContainer {
411
+ id: string;
412
+ title: string;
413
+ }
414
+ interface IView {
415
+ id: string;
416
+ name: string;
417
+ }
418
+ interface IColor {
419
+ id: string;
420
+ description: string;
421
+ defaults: {
422
+ light: string;
423
+ dark: string;
424
+ highContrast: string;
425
+ };
426
+ }
427
+ interface IWebviewEditor {
428
+ readonly viewType: string;
429
+ readonly priority: string;
430
+ readonly selector: readonly {
431
+ readonly filenamePattern?: string;
432
+ }[];
433
+ }
434
+ interface ICodeActionContributionAction {
435
+ readonly kind: string;
436
+ readonly title: string;
437
+ readonly description?: string;
438
+ }
439
+ interface ICodeActionContribution {
440
+ readonly languages: readonly string[];
441
+ readonly actions: readonly ICodeActionContributionAction[];
442
+ }
443
+ interface IAuthenticationContribution {
444
+ readonly id: string;
445
+ readonly label: string;
446
+ }
447
+ interface IWalkthroughStep {
448
+ readonly id: string;
449
+ readonly title: string;
450
+ readonly description: string | undefined;
451
+ readonly media: {
452
+ image: string | {
453
+ dark: string;
454
+ light: string;
455
+ hc: string;
456
+ };
457
+ altText: string;
458
+ markdown?: never;
459
+ svg?: never;
460
+ } | {
461
+ markdown: string;
462
+ image?: never;
463
+ svg?: never;
464
+ } | {
465
+ svg: string;
466
+ altText: string;
467
+ markdown?: never;
468
+ image?: never;
469
+ };
470
+ readonly completionEvents?: string[];
471
+ /** @deprecated use `completionEvents: 'onCommand:...'` */
472
+ readonly doneOn?: {
473
+ command: string;
474
+ };
475
+ readonly when?: string;
476
+ }
477
+ interface IWalkthrough {
478
+ readonly id: string;
479
+ readonly title: string;
480
+ readonly description: string;
481
+ readonly steps: IWalkthroughStep[];
482
+ readonly featuredFor: string[] | undefined;
483
+ readonly when?: string;
484
+ }
485
+ interface IStartEntry {
486
+ readonly title: string;
487
+ readonly description: string;
488
+ readonly command: string;
489
+ readonly when?: string;
490
+ readonly category: 'file' | 'folder' | 'notebook';
491
+ }
492
+ interface INotebookEntry {
493
+ readonly type: string;
494
+ readonly displayName: string;
495
+ }
496
+ interface INotebookRendererContribution {
497
+ readonly id: string;
498
+ readonly displayName: string;
499
+ readonly mimeTypes: string[];
500
+ }
501
+ interface ITranslation {
502
+ id: string;
503
+ path: string;
504
+ }
505
+ interface ILocalizationContribution {
506
+ languageId: string;
507
+ languageName?: string;
508
+ localizedLanguageName?: string;
509
+ translations: ITranslation[];
510
+ minimalTranslations?: {
511
+ [key: string]: string;
512
+ };
513
+ }
514
+ interface IExtensionContributions {
515
+ commands?: ICommand[];
516
+ configuration?: IConfiguration | IConfiguration[];
517
+ debuggers?: IDebugger[];
518
+ grammars?: IGrammar[];
519
+ jsonValidation?: IJSONValidation[];
520
+ keybindings?: IKeyBinding[];
521
+ languages?: ILanguage[];
522
+ menus?: {
523
+ [context: string]: IMenu[];
524
+ };
525
+ snippets?: ISnippet[];
526
+ themes?: ITheme[];
527
+ iconThemes?: ITheme[];
528
+ productIconThemes?: ITheme[];
529
+ viewsContainers?: {
530
+ [location: string]: IViewContainer[];
531
+ };
532
+ views?: {
533
+ [location: string]: IView[];
534
+ };
535
+ colors?: IColor[];
536
+ localizations?: ILocalizationContribution[];
537
+ readonly customEditors?: readonly IWebviewEditor[];
538
+ readonly codeActions?: readonly ICodeActionContribution[];
539
+ authentication?: IAuthenticationContribution[];
540
+ walkthroughs?: IWalkthrough[];
541
+ startEntries?: IStartEntry[];
542
+ readonly notebooks?: INotebookEntry[];
543
+ readonly notebookRenderer?: INotebookRendererContribution[];
544
+ }
545
+ interface IExtensionCapabilities {
546
+ readonly virtualWorkspaces?: ExtensionVirtualWorkspaceSupport;
547
+ readonly untrustedWorkspaces?: ExtensionUntrustedWorkspaceSupport;
548
+ }
549
+ declare type LimitedWorkspaceSupportType = 'limited';
550
+ declare type ExtensionUntrustedWorkspaceSupport = {
551
+ supported: true;
552
+ } | {
553
+ supported: false;
554
+ description: string;
555
+ } | {
556
+ supported: LimitedWorkspaceSupportType;
557
+ description: string;
558
+ restrictedConfigurations?: string[];
559
+ };
560
+ declare type ExtensionVirtualWorkspaceSupport = boolean | {
561
+ supported: true;
562
+ } | {
563
+ supported: false | LimitedWorkspaceSupportType;
564
+ description: string;
565
+ };
566
+ interface IRelaxedExtensionManifest {
567
+ name: string;
568
+ displayName?: string;
569
+ publisher: string;
570
+ version: string;
571
+ engines: {
572
+ readonly vscode: string;
573
+ };
574
+ description?: string;
575
+ main?: string;
576
+ browser?: string;
577
+ icon?: string;
578
+ categories?: string[];
579
+ keywords?: string[];
580
+ activationEvents?: string[];
581
+ extensionDependencies?: string[];
582
+ extensionPack?: string[];
583
+ extensionKind?: ExtensionKind | ExtensionKind[];
584
+ contributes?: IExtensionContributions;
585
+ repository?: {
586
+ url: string;
587
+ };
588
+ bugs?: {
589
+ url: string;
590
+ };
591
+ enabledApiProposals?: readonly string[];
592
+ api?: string;
593
+ scripts?: {
594
+ [key: string]: string;
595
+ };
596
+ capabilities?: IExtensionCapabilities;
597
+ }
598
+ declare const enum TargetPlatform {
599
+ WIN32_X64 = "win32-x64",
600
+ WIN32_IA32 = "win32-ia32",
601
+ WIN32_ARM64 = "win32-arm64",
602
+ LINUX_X64 = "linux-x64",
603
+ LINUX_ARM64 = "linux-arm64",
604
+ LINUX_ARMHF = "linux-armhf",
605
+ ALPINE_X64 = "alpine-x64",
606
+ ALPINE_ARM64 = "alpine-arm64",
607
+ DARWIN_X64 = "darwin-x64",
608
+ DARWIN_ARM64 = "darwin-arm64",
609
+ WEB = "web",
610
+ UNIVERSAL = "universal",
611
+ UNKNOWN = "unknown",
612
+ UNDEFINED = "undefined"
613
+ }
614
+ /**
615
+ * **!Do not construct directly!**
616
+ *
617
+ * **!Only static methods because it gets serialized!**
618
+ *
619
+ * This represents the "canonical" version for an extension identifier. Extension ids
620
+ * have to be case-insensitive (due to the marketplace), but we must ensure case
621
+ * preservation because the extension API is already public at this time.
622
+ *
623
+ * For example, given an extension with the publisher `"Hello"` and the name `"World"`,
624
+ * its canonical extension identifier is `"Hello.World"`. This extension could be
625
+ * referenced in some other extension's dependencies using the string `"hello.world"`.
626
+ *
627
+ * To make matters more complicated, an extension can optionally have an UUID. When two
628
+ * extensions have the same UUID, they are considered equal even if their identifier is different.
629
+ */
630
+ declare class ExtensionIdentifier {
631
+ readonly value: string;
632
+ private readonly _lower;
633
+ constructor(value: string);
634
+ static equals(a: ExtensionIdentifier | string | null | undefined, b: ExtensionIdentifier | string | null | undefined): boolean;
635
+ /**
636
+ * Gives the value by which to index (for equality).
637
+ */
638
+ static toKey(id: ExtensionIdentifier | string): string;
639
+ }
640
+ interface IRelaxedExtensionDescription extends IRelaxedExtensionManifest {
641
+ id?: string;
642
+ identifier: ExtensionIdentifier;
643
+ uuid?: string;
644
+ targetPlatform: TargetPlatform;
645
+ isBuiltin: boolean;
646
+ isUserBuiltin: boolean;
647
+ isUnderDevelopment: boolean;
648
+ extensionLocation: URI;
649
+ }
650
+ declare type IExtensionDescription = Readonly<IRelaxedExtensionDescription>;
651
+
652
+ type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
653
+
654
+ declare const ITextMateService: ServiceIdentifier<ITextMateService>;
655
+ interface ITextMateService {
656
+ readonly _serviceBrand: undefined;
657
+ onDidEncounterLanguage: Event<string>;
658
+ createGrammar(languageId: string): Promise<IGrammar$1 | null>;
659
+ startDebugMode(printFn: (str: string) => void, onStop: () => void): void;
660
+ }
661
+
662
+ interface IEmbeddedLanguagesMap {
663
+ [scopeName: string]: string;
664
+ }
665
+ interface TokenTypesContribution {
666
+ [scopeName: string]: string;
667
+ }
668
+ interface ITMSyntaxExtensionPoint {
669
+ language: string;
670
+ scopeName: string;
671
+ path: string;
672
+ embeddedLanguages: IEmbeddedLanguagesMap;
673
+ tokenTypes: TokenTypesContribution;
674
+ injectTo: string[];
675
+ balancedBracketScopes: string[];
676
+ unbalancedBracketScopes: string[];
677
+ }
678
+
679
+ declare type PartialITMSyntaxExtensionPoint = Partial<ITMSyntaxExtensionPoint> & Pick<ITMSyntaxExtensionPoint, 'path' | 'scopeName'>;
680
+ declare function setGrammars<T extends PartialITMSyntaxExtensionPoint>(grammars: T[], getContent: (grammar: T) => Promise<string>, extension?: IExtensionDescription): void;
681
+ declare function getServiceOverride(getOnigLib: () => Promise<Response | ArrayBuffer>): IEditorOverrideServices;
682
+
683
+ export { PartialITMSyntaxExtensionPoint as ITMSyntaxExtensionPoint, ITextMateService, getServiceOverride as default, setGrammars };