Skip to content

Commit

Permalink
Example for Terminal#exitStatus usage in comments
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ducas <philippe.ducas@ericsson.ca>
  • Loading branch information
educphi committed May 25, 2022
1 parent eacd3cb commit 9337635
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2835,6 +2835,16 @@ export module '@theia/plugin' {

/**
* The exit status of the terminal, this will be undefined while the terminal is active.
*
* **Example:** Show a notification with the exit code when the terminal exits with a
* non-zero exit code.
* ```typescript
* window.onDidCloseTerminal(t => {
* if (t.exitStatus && t.exitStatus.code) {
* vscode.window.showInformationMessage(`Exit code: ${t.exitStatus.code}`);
* }
* });
* ```
*/
readonly exitStatus: TerminalExitStatus | undefined;

Expand Down

0 comments on commit 9337635

Please sign in to comment.