Skip to content

Commit

Permalink
add missing deprecated show overload
Browse files Browse the repository at this point in the history
Add an old deprecated overload signature for OutputChannel.show in
theia.d.ts and update the implementation accordingly.
  • Loading branch information
Estelle Foisy committed Sep 8, 2022
1 parent 9ab4618 commit 7a5b62d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ export class OutputChannelImpl implements theia.OutputChannel {
this.proxy.$clear(this.name);
}

show(preserveFocus: boolean | undefined): void {
show(preserveFocusOrColumn?: boolean | theia.ViewColumn, preserveFocus?: boolean): void {
this.validate();
if (typeof preserveFocusOrColumn === 'boolean') {
preserveFocus = preserveFocusOrColumn;
}
this.proxy.$reveal(this.name, !!preserveFocus);
}

Expand Down
10 changes: 10 additions & 0 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2782,6 +2782,16 @@ export module '@theia/plugin' {
*/
clear(): void;

/**
* Reveal this channel in the UI.
*
* @deprecated Use the overload with just one parameter (`show(preserveFocus?: boolean): void`).
*
* @param column This argument is **deprecated** and will be ignored.
* @param preserveFocus When `true` the channel will not take focus.
*/
show(column?: ViewColumn, preserveFocus?: boolean): void;

/**
* Reveal this channel in the UI.
*
Expand Down

0 comments on commit 7a5b62d

Please sign in to comment.