Skip to content

Commit 096d627

Browse files
committed
Make terminal access APIs stable
Fixes #52574
1 parent acc5bf3 commit 096d627

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/vs/vscode.d.ts

+11
Original file line numberDiff line numberDiff line change
@@ -5784,6 +5784,17 @@ declare module 'vscode' {
57845784
*/
57855785
export const onDidChangeTextEditorViewColumn: Event<TextEditorViewColumnChangeEvent>;
57865786

5787+
/**
5788+
* The currently opened terminals or an empty array.
5789+
*/
5790+
export const terminals: ReadonlyArray<Terminal>;
5791+
5792+
/**
5793+
* An [event](#Event) which fires when a terminal has been created, either through the
5794+
* [createTerminal](#window.createTerminal) API or commands.
5795+
*/
5796+
export const onDidOpenTerminal: Event<Terminal>;
5797+
57875798
/**
57885799
* An [event](#Event) which fires when a terminal is disposed.
57895800
*/

src/vs/vscode.proposed.d.ts

-11
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,6 @@ declare module 'vscode' {
615615
}
616616

617617
export namespace window {
618-
/**
619-
* The currently opened terminals or an empty array.
620-
*/
621-
export const terminals: ReadonlyArray<Terminal>;
622-
623618
/**
624619
* The currently active terminal or `undefined`. The active terminal is the one that
625620
* currently has focus or most recently had focus.
@@ -633,12 +628,6 @@ declare module 'vscode' {
633628
*/
634629
export const onDidChangeActiveTerminal: Event<Terminal | undefined>;
635630

636-
/**
637-
* An [event](#Event) which fires when a terminal has been created, either through the
638-
* [createTerminal](#window.createTerminal) API or commands.
639-
*/
640-
export const onDidOpenTerminal: Event<Terminal>;
641-
642631
/**
643632
* Create a [TerminalRenderer](#TerminalRenderer).
644633
*

src/vs/workbench/api/node/extHost.api.impl.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ export function createApiFactory(
335335
return proposedApiFunction(extension, extHostTerminalService.activeTerminal);
336336
},
337337
get terminals() {
338-
return proposedApiFunction(extension, extHostTerminalService.terminals);
338+
return extHostTerminalService.terminals;
339339
},
340340
showTextDocument(documentOrUri: vscode.TextDocument | vscode.Uri, columnOrOptions?: vscode.ViewColumn | vscode.TextDocumentShowOptions, preserveFocus?: boolean): TPromise<vscode.TextEditor> {
341341
let documentPromise: TPromise<vscode.TextDocument>;
@@ -372,9 +372,9 @@ export function createApiFactory(
372372
onDidCloseTerminal(listener, thisArg?, disposables?) {
373373
return extHostTerminalService.onDidCloseTerminal(listener, thisArg, disposables);
374374
},
375-
onDidOpenTerminal: proposedApiFunction(extension, (listener, thisArg?, disposables?) => {
375+
onDidOpenTerminal(listener, thisArg?, disposables?) {
376376
return extHostTerminalService.onDidOpenTerminal(listener, thisArg, disposables);
377-
}),
377+
},
378378
onDidChangeActiveTerminal: proposedApiFunction(extension, (listener, thisArg?, disposables?) => {
379379
return extHostTerminalService.onDidChangeActiveTerminal(listener, thisArg, disposables);
380380
}),

0 commit comments

Comments
 (0)