Skip to content

Commit

Permalink
Initial .d.ts outlining modiyfing tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
lramos15 committed Sep 21, 2021
1 parent 121d1a6 commit a0446e9
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion src/vs/vscode.proposed.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2232,8 +2232,14 @@ declare module 'vscode' {
*/
readonly label: string;


/**
* The index of the tab within the view column
*/
readonly index: number;

/**
* The position of the tab
* The column the tab belongs to
*/
readonly viewColumn: ViewColumn;

Expand All @@ -2255,6 +2261,23 @@ declare module 'vscode' {
* Dictated by being the selected tab in the active group
*/
readonly isActive: boolean;

/**
* Closes the tab object
*/
close(): void;

/**
* Sets the label of the tab
*/
setLabel(label: string): void;

/**
* Moves the tab to the new index and view column
* @param index The new index of the tab within the current group
* @param viewColumn The new view column of the tab.
*/
move(index: number, viewColumn: ViewColumn): void;
}

export namespace window {
Expand Down Expand Up @@ -2282,6 +2305,13 @@ declare module 'vscode' {
*/
export const onDidChangeActiveTab: Event<Tab | undefined>;

/**
* Opens a tab
* @param tab The object representing the tab you want to open
* @returns The opened tab
*/
export function openTab(tab: Exclude<Tab, Function>): Thenable<Tab>;

}

//#endregion
Expand Down

0 comments on commit a0446e9

Please sign in to comment.