@theia/plugin 1.39.0-next.9 → 1.40.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.
@@ -1,758 +0,0 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2018 Red Hat, Inc. and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- /* eslint-disable @typescript-eslint/no-explicit-any */
18
-
19
- /**
20
- * This is the place for API experiments and proposals.
21
- * These API are NOT stable and subject to change. Use it on own risk.
22
- */
23
- export module '@theia/plugin' {
24
- /**
25
- * The contiguous set of modified lines in a diff.
26
- */
27
- export interface LineChange {
28
- readonly originalStartLineNumber: number;
29
- readonly originalEndLineNumber: number;
30
- readonly modifiedStartLineNumber: number;
31
- readonly modifiedEndLineNumber: number;
32
- }
33
-
34
- export namespace commands {
35
-
36
- /**
37
- * Get the keybindings associated to commandId.
38
- * @param commandId The ID of the command for which we are looking for keybindings.
39
- */
40
- export function getKeyBinding(commandId: string): Thenable<CommandKeyBinding[] | undefined>;
41
-
42
- /**
43
- * Registers a diff information command that can be invoked via a keyboard shortcut,
44
- * a menu item, an action, or directly.
45
- *
46
- * Diff information commands are different from ordinary [commands](#commands.registerCommand) as
47
- * they only execute when there is an active diff editor when the command is called, and the diff
48
- * information has been computed. Also, the command handler of an editor command has access to
49
- * the diff information.
50
- *
51
- * @param command A unique identifier for the command.
52
- * @param callback A command handler function with access to the [diff information](#LineChange).
53
- * @param thisArg The `this` context used when invoking the handler function.
54
- * @return Disposable which unregisters this command on disposal.
55
- */
56
- export function registerDiffInformationCommand(command: string, callback: (diff: LineChange[], ...args: any[]) => any, thisArg?: any): Disposable;
57
-
58
- }
59
-
60
- /**
61
- * Key Binding of a command
62
- */
63
- export interface CommandKeyBinding {
64
- /**
65
- * Identifier of the command.
66
- */
67
- id: string;
68
- /**
69
- * Value of the keyBinding
70
- */
71
- value: string;
72
- }
73
-
74
- /**
75
- * Enumeration of the supported operating systems.
76
- */
77
- export enum OperatingSystem {
78
- Windows = 'Windows',
79
- Linux = 'Linux',
80
- OSX = 'OSX'
81
- }
82
-
83
- export namespace env {
84
-
85
- /**
86
- * Returns the type of the operating system on the client side (like browser'OS if using browser mode). If it is neither [Windows](isWindows) nor [OS X](isOSX), then
87
- * it always return with the `Linux` OS type.
88
- */
89
- export function getClientOperatingSystem(): Thenable<OperatingSystem>;
90
-
91
- }
92
-
93
- export interface DecorationData {
94
- letter?: string;
95
- title?: string;
96
- color?: ThemeColor;
97
- priority?: number;
98
- bubble?: boolean;
99
- source?: string;
100
- }
101
-
102
- // #region SCM validation
103
-
104
- /**
105
- * Represents the validation type of the Source Control input.
106
- */
107
- export enum SourceControlInputBoxValidationType {
108
-
109
- /**
110
- * Something not allowed by the rules of a language or other means.
111
- */
112
- Error = 0,
113
-
114
- /**
115
- * Something suspicious but allowed.
116
- */
117
- Warning = 1,
118
-
119
- /**
120
- * Something to inform about but not a problem.
121
- */
122
- Information = 2
123
- }
124
-
125
- export interface SourceControlInputBoxValidation {
126
-
127
- /**
128
- * The validation message to display.
129
- */
130
- readonly message: string;
131
-
132
- /**
133
- * The validation type.
134
- */
135
- readonly type: SourceControlInputBoxValidationType;
136
- }
137
-
138
- /**
139
- * Represents the input box in the Source Control viewlet.
140
- */
141
- export interface SourceControlInputBox {
142
-
143
- /**
144
- * A validation function for the input box. It's possible to change
145
- * the validation provider simply by setting this property to a different function.
146
- */
147
- validateInput?(value: string, cursorPosition: number): ProviderResult<SourceControlInputBoxValidation | undefined | null>;
148
- }
149
-
150
- // #endregion
151
-
152
- export interface SourceControl {
153
-
154
- /**
155
- * Whether the source control is selected.
156
- */
157
- readonly selected: boolean;
158
-
159
- /**
160
- * An event signaling when the selection state changes.
161
- */
162
- readonly onDidChangeSelection: Event<boolean>;
163
- }
164
-
165
- export interface SourceControlResourceDecorations {
166
- source?: string;
167
- letter?: string;
168
- color?: ThemeColor;
169
- }
170
-
171
- // #region search in workspace
172
- /**
173
- * The parameters of a query for text search.
174
- */
175
- export interface TextSearchQuery {
176
- /**
177
- * The text pattern to search for.
178
- */
179
- pattern: string;
180
-
181
- /**
182
- * Whether or not `pattern` should match multiple lines of text.
183
- */
184
- isMultiline?: boolean;
185
-
186
- /**
187
- * Whether or not `pattern` should be interpreted as a regular expression.
188
- */
189
- isRegExp?: boolean;
190
-
191
- /**
192
- * Whether or not the search should be case-sensitive.
193
- */
194
- isCaseSensitive?: boolean;
195
-
196
- /**
197
- * Whether or not to search for whole word matches only.
198
- */
199
- isWordMatch?: boolean;
200
- }
201
-
202
- /**
203
- * Options that can be set on a findTextInFiles search.
204
- */
205
- export interface FindTextInFilesOptions {
206
- /**
207
- * A [glob pattern](#GlobPattern) that defines the files to search for. The glob pattern
208
- * will be matched against the file paths of files relative to their workspace. Use a [relative pattern](#RelativePattern)
209
- * to restrict the search results to a [workspace folder](#WorkspaceFolder).
210
- */
211
- include?: GlobPattern;
212
-
213
- /**
214
- * A [glob pattern](#GlobPattern) that defines files and folders to exclude. The glob pattern
215
- * will be matched against the file paths of resulting matches relative to their workspace. When `undefined`, default excludes will
216
- * apply.
217
- */
218
- exclude?: GlobPattern;
219
-
220
- /**
221
- * Whether to use the default and user-configured excludes. Defaults to true.
222
- */
223
- useDefaultExcludes?: boolean;
224
-
225
- /**
226
- * The maximum number of results to search for
227
- */
228
- maxResults?: number;
229
-
230
- /**
231
- * Whether external files that exclude files, like .gitignore, should be respected.
232
- * See the vscode setting `"search.useIgnoreFiles"`.
233
- */
234
- useIgnoreFiles?: boolean;
235
-
236
- /**
237
- * Whether global files that exclude files, like .gitignore, should be respected.
238
- * See the vscode setting `"search.useGlobalIgnoreFiles"`.
239
- */
240
- useGlobalIgnoreFiles?: boolean;
241
-
242
- /**
243
- * Whether symlinks should be followed while searching.
244
- * See the vscode setting `"search.followSymlinks"`.
245
- */
246
- followSymlinks?: boolean;
247
-
248
- /**
249
- * Interpret files using this encoding.
250
- * See the vscode setting `"files.encoding"`
251
- */
252
- encoding?: string;
253
-
254
- /**
255
- * Options to specify the size of the result text preview.
256
- */
257
- previewOptions?: TextSearchPreviewOptions;
258
-
259
- /**
260
- * Number of lines of context to include before each match.
261
- */
262
- beforeContext?: number;
263
-
264
- /**
265
- * Number of lines of context to include after each match.
266
- */
267
- afterContext?: number;
268
- }
269
-
270
- /**
271
- * A match from a text search
272
- */
273
- export interface TextSearchMatch {
274
- /**
275
- * The uri for the matching document.
276
- */
277
- uri: Uri;
278
-
279
- /**
280
- * The range of the match within the document, or multiple ranges for multiple matches.
281
- */
282
- ranges: Range | Range[];
283
-
284
- /**
285
- * A preview of the text match.
286
- */
287
- preview: TextSearchMatchPreview;
288
- }
289
-
290
- /**
291
- * A preview of the text result.
292
- */
293
- export interface TextSearchMatchPreview {
294
- /**
295
- * The matching lines of text, or a portion of the matching line that contains the match.
296
- */
297
- text: string;
298
-
299
- /**
300
- * The Range within `text` corresponding to the text of the match.
301
- * The number of matches must match the TextSearchMatch's range property.
302
- */
303
- matches: Range | Range[];
304
- }
305
-
306
- /**
307
- * Options to specify the size of the result text preview.
308
- * These options don't affect the size of the match itself, just the amount of preview text.
309
- */
310
- export interface TextSearchPreviewOptions {
311
- /**
312
- * The maximum number of lines in the preview.
313
- * Only search providers that support multiline search will ever return more than one line in the match.
314
- */
315
- matchLines: number;
316
-
317
- /**
318
- * The maximum number of characters included per line.
319
- */
320
- charsPerLine: number;
321
- }
322
-
323
- /**
324
- * A line of context surrounding a TextSearchMatch.
325
- */
326
- export interface TextSearchContext {
327
- /**
328
- * The uri for the matching document.
329
- */
330
- uri: Uri;
331
-
332
- /**
333
- * One line of text.
334
- * previewOptions.charsPerLine applies to this
335
- */
336
- text: string;
337
-
338
- /**
339
- * The line number of this line of context.
340
- */
341
- lineNumber: number;
342
- }
343
-
344
- export type TextSearchResult = TextSearchMatch | TextSearchContext;
345
-
346
- /**
347
- * Information collected when text search is complete.
348
- */
349
- export interface TextSearchComplete {
350
- /**
351
- * Whether the search hit the limit on the maximum number of search results.
352
- * `maxResults` on [`TextSearchOptions`](#TextSearchOptions) specifies the max number of results.
353
- * - If exactly that number of matches exist, this should be false.
354
- * - If `maxResults` matches are returned and more exist, this should be true.
355
- * - If search hits an internal limit which is less than `maxResults`, this should be true.
356
- */
357
- limitHit?: boolean;
358
- }
359
-
360
- export namespace workspace {
361
- /**
362
- * Find text in files across all [workspace folders] in the workspace
363
- * @param query What to search
364
- * @param optionsOrCallback
365
- * @param callbackOrToken
366
- * @param token
367
- */
368
- export function findTextInFiles(query: TextSearchQuery, optionsOrCallback: FindTextInFilesOptions | ((result: TextSearchResult) => void),
369
- callbackOrToken?: CancellationToken | ((result: TextSearchResult) => void), token?: CancellationToken): Promise<TextSearchComplete>;
370
- }
371
- // #endregion
372
-
373
- // #region read/write in chunks: https://github.com/microsoft/vscode/issues/84515
374
-
375
- export interface FileSystemProvider {
376
- open?(resource: Uri, options: { create: boolean; }): number | Thenable<number>;
377
- close?(fd: number): void | Thenable<void>;
378
- read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
379
- write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): number | Thenable<number>;
380
- }
381
-
382
- // #endregion
383
-
384
- // #region Custom editor move https://github.com/microsoft/vscode/issues/86146
385
- // copied from https://github.com/microsoft/vscode/blob/53eac52308c4611000a171cc7bf1214293473c78/src/vs/vscode.proposed.d.ts#L986-L1007
386
-
387
- // TODO: Also for custom editor
388
-
389
- export interface CustomTextEditorProvider {
390
-
391
- /**
392
- * Handle when the underlying resource for a custom editor is renamed.
393
- *
394
- * This allows the webview for the editor be preserved throughout the rename. If this method is not implemented,
395
- * Theia will destroy the previous custom editor and create a replacement one.
396
- *
397
- * @param newDocument New text document to use for the custom editor.
398
- * @param existingWebviewPanel Webview panel for the custom editor.
399
- * @param token A cancellation token that indicates the result is no longer needed.
400
- *
401
- * @return Thenable indicating that the webview editor has been moved.
402
- */
403
- moveCustomTextEditor?(newDocument: TextDocument, existingWebviewPanel: WebviewPanel, token: CancellationToken): Thenable<void>;
404
- }
405
-
406
- // #endregion
407
-
408
- export interface ResourceLabelFormatter {
409
- scheme: string;
410
- authority?: string;
411
- formatting: ResourceLabelFormatting;
412
- }
413
-
414
- export interface ResourceLabelFormatting {
415
- label: string; // myLabel:/${path}
416
- // TODO@isi
417
- separator: '/' | '\\' | '';
418
- tildify?: boolean;
419
- normalizeDriveLetter?: boolean;
420
- workspaceSuffix?: string;
421
- authorityPrefix?: string;
422
- }
423
-
424
- export namespace workspace {
425
- export function registerResourceLabelFormatter(formatter: ResourceLabelFormatter): Disposable;
426
- }
427
-
428
- // #region timeline
429
- // copied from https://github.com/microsoft/vscode/blob/d69a79b73808559a91206d73d7717ff5f798f23c/src/vs/vscode.proposed.d.ts#L1870-L2017
430
- export class TimelineItem {
431
- /**
432
- * A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred.
433
- */
434
- timestamp: number;
435
-
436
- /**
437
- * A human-readable string describing the timeline item.
438
- */
439
- label: string;
440
-
441
- /**
442
- * Optional id for the timeline item. It must be unique across all the timeline items provided by this source.
443
- *
444
- * If not provided, an id is generated using the timeline item's timestamp.
445
- */
446
- id?: string;
447
-
448
- /**
449
- * The icon path or [ThemeIcon](#ThemeIcon) for the timeline item.
450
- */
451
- iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
452
-
453
- /**
454
- * A human readable string describing less prominent details of the timeline item.
455
- */
456
- description?: string;
457
-
458
- /**
459
- * The tooltip text when you hover over the timeline item.
460
- */
461
- detail?: string;
462
-
463
- /**
464
- * The [command](#Command) that should be executed when the timeline item is selected.
465
- */
466
- command?: Command;
467
-
468
- /**
469
- * Context value of the timeline item. This can be used to contribute specific actions to the item.
470
- * For example, a timeline item is given a context value as `commit`. When contributing actions to `timeline/item/context`
471
- * using `menus` extension point, you can specify context value for key `timelineItem` in `when` expression like `timelineItem == commit`.
472
- * ```
473
- * "contributes": {
474
- * "menus": {
475
- * "timeline/item/context": [{
476
- * "command": "extension.copyCommitId",
477
- * "when": "timelineItem == commit"
478
- * }]
479
- * }
480
- * }
481
- * ```
482
- * This will show the `extension.copyCommitId` action only for items where `contextValue` is `commit`.
483
- */
484
- contextValue?: string;
485
-
486
- /**
487
- * Accessibility information used when screen reader interacts with this timeline item.
488
- */
489
- accessibilityInformation?: AccessibilityInformation;
490
-
491
- /**
492
- * @param label A human-readable string describing the timeline item
493
- * @param timestamp A timestamp (in milliseconds since 1 January 1970 00:00:00) for when the timeline item occurred
494
- */
495
- constructor(label: string, timestamp: number);
496
- }
497
-
498
- export interface TimelineChangeEvent {
499
- /**
500
- * The [uri](#Uri) of the resource for which the timeline changed.
501
- */
502
- uri: Uri;
503
-
504
- /**
505
- * A flag which indicates whether the entire timeline should be reset.
506
- */
507
- reset?: boolean;
508
- }
509
-
510
- export interface Timeline {
511
- readonly paging?: {
512
- /**
513
- * A provider-defined cursor specifying the starting point of timeline items which are after the ones returned.
514
- * Use `undefined` to signal that there are no more items to be returned.
515
- */
516
- readonly cursor: string | undefined;
517
- }
518
-
519
- /**
520
- * An array of [timeline items](#TimelineItem).
521
- */
522
- readonly items: readonly TimelineItem[];
523
- }
524
-
525
- export interface TimelineOptions {
526
- /**
527
- * A provider-defined cursor specifying the starting point of the timeline items that should be returned.
528
- */
529
- cursor?: string;
530
-
531
- /**
532
- * An optional maximum number timeline items or the all timeline items newer (inclusive) than the timestamp or id that should be returned.
533
- * If `undefined` all timeline items should be returned.
534
- */
535
- limit?: number | { timestamp: number; id?: string };
536
- }
537
-
538
- export interface TimelineProvider {
539
- /**
540
- * An optional event to signal that the timeline for a source has changed.
541
- * To signal that the timeline for all resources (uris) has changed, do not pass any argument or pass `undefined`.
542
- */
543
- onDidChange?: Event<TimelineChangeEvent | undefined>;
544
-
545
- /**
546
- * An identifier of the source of the timeline items. This can be used to filter sources.
547
- */
548
- readonly id: string;
549
-
550
- /**
551
- * A human-readable string describing the source of the timeline items. This can be used as the display label when filtering sources.
552
- */
553
- readonly label: string;
554
-
555
- /**
556
- * Provide [timeline items](#TimelineItem) for a [Uri](#Uri).
557
- *
558
- * @param uri The [uri](#Uri) of the file to provide the timeline for.
559
- * @param options A set of options to determine how results should be returned.
560
- * @param token A cancellation token.
561
- * @return The [timeline result](#TimelineResult) or a thenable that resolves to such. The lack of a result
562
- * can be signaled by returning `undefined`, `null`, or an empty array.
563
- */
564
- provideTimeline(uri: Uri, options: TimelineOptions, token: CancellationToken): ProviderResult<Timeline>;
565
- }
566
-
567
- export namespace workspace {
568
- /**
569
- * Register a timeline provider.
570
- *
571
- * Multiple providers can be registered. In that case, providers are asked in
572
- * parallel and the results are merged. A failing provider (rejected promise or exception) will
573
- * not cause a failure of the whole operation.
574
- *
575
- * @param scheme A scheme or schemes that defines which documents this provider is applicable to. Can be `*` to target all documents.
576
- * @param provider A timeline provider.
577
- * @return A [disposable](#Disposable) that unregisters this provider when being disposed.
578
- */
579
- export function registerTimelineProvider(scheme: string | string[], provider: TimelineProvider): Disposable;
580
- }
581
-
582
- // Copied from https://github.com/microsoft/vscode/blob/ad4470522ecd858cfaf53a87c2702d7a40946ba1/src/vscode-dts/vscode.proposed.extensionsAny.d.ts
583
- // https://github.com/microsoft/vscode/issues/145307
584
-
585
- export interface Extension<T> {
586
-
587
- /**
588
- * `true` when the extension is associated to another extension host.
589
- *
590
- * *Note* that an extension from another extension host cannot export
591
- * API, e.g {@link Extension.exports its exports} are always `undefined`.
592
- */
593
- readonly isFromDifferentExtensionHost: boolean;
594
- }
595
-
596
- export namespace extensions {
597
-
598
- /**
599
- * Get an extension by its full identifier in the form of: `publisher.name`.
600
- *
601
- * @param extensionId An extension identifier.
602
- * @param includeDifferentExtensionHosts Include extensions from different extension host
603
- * @return An extension or `undefined`.
604
- */
605
- export function getExtension<T = any>(extensionId: string, includeDifferentExtensionHosts: boolean): Extension<T> | undefined;
606
-
607
- /**
608
- * All extensions across all extension hosts.
609
- *
610
- * @see {@link Extension.isFromDifferentExtensionHost}
611
- */
612
- export const allAcrossExtensionHosts: readonly Extension<void>[];
613
-
614
- }
615
-
616
- // #region DocumentPaste
617
-
618
- // https://github.com/microsoft/vscode/issues/30066/
619
-
620
- /**
621
- * Provider invoked when the user copies and pastes code.
622
- */
623
- export interface DocumentPasteEditProvider {
624
-
625
- /**
626
- * Optional method invoked after the user copies text in a file.
627
- *
628
- * During {@link prepareDocumentPaste}, an extension can compute metadata that is attached to
629
- * a {@link DataTransfer} and is passed back to the provider in {@link provideDocumentPasteEdits}.
630
- *
631
- * @param document Document where the copy took place.
632
- * @param ranges Ranges being copied in the `document`.
633
- * @param dataTransfer The data transfer associated with the copy. You can store additional values on this for later use in {@link provideDocumentPasteEdits}.
634
- * @param token A cancellation token.
635
- */
636
- prepareDocumentPaste?(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): void | Thenable<void>;
637
-
638
- /**
639
- * Invoked before the user pastes into a document.
640
- *
641
- * In this method, extensions can return a workspace edit that replaces the standard pasting behavior.
642
- *
643
- * @param document Document being pasted into
644
- * @param ranges Currently selected ranges in the document.
645
- * @param dataTransfer The data transfer associated with the paste.
646
- * @param token A cancellation token.
647
- *
648
- * @return Optional workspace edit that applies the paste. Return undefined to use standard pasting.
649
- */
650
- provideDocumentPasteEdits(document: TextDocument, ranges: readonly Range[], dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentPasteEdit>;
651
- }
652
-
653
- /**
654
- * An operation applied on paste
655
- */
656
- class DocumentPasteEdit {
657
- /**
658
- * The text or snippet to insert at the pasted locations.
659
- */
660
- insertText: string | SnippetString;
661
-
662
- /**
663
- * An optional additional edit to apply on paste.
664
- */
665
- additionalEdit?: WorkspaceEdit;
666
-
667
- /**
668
- * @param insertText The text or snippet to insert at the pasted locations.
669
- */
670
- constructor(insertText: string | SnippetString);
671
- }
672
-
673
- interface DocumentPasteProviderMetadata {
674
- /**
675
- * Mime types that `provideDocumentPasteEdits` should be invoked for.
676
- *
677
- * Use the special `files` mimetype to indicate the provider should be invoked if any files are present in the `DataTransfer`.
678
- */
679
- readonly pasteMimeTypes: readonly string[];
680
- }
681
-
682
- namespace languages {
683
- export function registerDocumentPasteEditProvider(selector: DocumentSelector, provider: DocumentPasteEditProvider, metadata: DocumentPasteProviderMetadata): Disposable;
684
- }
685
- // #endregion
686
-
687
- // #region ProfileContentHandler
688
-
689
- export interface ProfileContentHandler {
690
- readonly name: string;
691
- saveProfile(name: string, content: string, token: CancellationToken): Thenable<Uri | null>;
692
- readProfile(uri: Uri, token: CancellationToken): Thenable<string | null>;
693
- }
694
-
695
- export namespace window {
696
- export function registerProfileContentHandler(id: string, profileContentHandler: ProfileContentHandler): Disposable;
697
- }
698
-
699
- // #endregion ProfileContentHandler
700
-
701
- // #region TerminalQuickFixProvider
702
-
703
- export namespace window {
704
- /**
705
- * @param provider A terminal quick fix provider
706
- * @return A {@link Disposable} that un-registers the provider when being disposed
707
- */
708
- export function registerTerminalQuickFixProvider(id: string, provider: TerminalQuickFixProvider): Disposable;
709
- }
710
-
711
- export interface TerminalQuickFixProvider {
712
- /**
713
- * Provides terminal quick fixes
714
- * @param commandMatchResult The command match result for which to provide quick fixes
715
- * @param token A cancellation token indicating the result is no longer needed
716
- * @return Terminal quick fix(es) if any
717
- */
718
- provideTerminalQuickFixes(commandMatchResult: TerminalCommandMatchResult, token: CancellationToken): TerminalQuickFix[] | TerminalQuickFix | undefined;
719
- }
720
-
721
- export interface TerminalCommandMatchResult {
722
- commandLine: string;
723
- commandLineMatch: RegExpMatchArray;
724
- outputMatch?: {
725
- regexMatch: RegExpMatchArray;
726
- outputLines?: string[];
727
- };
728
- }
729
-
730
- interface TerminalQuickFix {
731
- type: TerminalQuickFixType;
732
- }
733
-
734
- enum TerminalQuickFixType {
735
- command = 'command',
736
- opener = 'opener'
737
- }
738
-
739
- // #endRegion TerminalQuickFixProvider
740
- }
741
-
742
- /**
743
- * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
744
- * and others. This API makes no assumption about what promise library is being used which
745
- * enables reusing existing code without migrating to a specific promise implementation. Still,
746
- * we recommend the use of native promises which are available in this editor.
747
- */
748
- interface Thenable<T> {
749
- /**
750
- * Attaches callbacks for the resolution and/or rejection of the Promise.
751
- * @param onfulfilled The callback to execute when the Promise is resolved.
752
- * @param onrejected The callback to execute when the Promise is rejected.
753
- * @returns A Promise for the completion of which ever callback is executed.
754
- */
755
- then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
756
- then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
757
- }
758
-