Skip to content

Commit

Permalink
Finalize TerminalExitReason API
Browse files Browse the repository at this point in the history
Fixes #130231
  • Loading branch information
Tyriar authored and joyceerhl committed Aug 10, 2022
1 parent 7b935fc commit 2313386
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const allApiProposals = Object.freeze({
telemetry: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts',
terminalDataWriteEvent: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts',
terminalDimensions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts',
terminalExitReason: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalExitReason.d.ts',
testCoverage: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts',
testObserver: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts',
textSearchProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts',
Expand Down
35 changes: 35 additions & 0 deletions src/vscode-dts/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10822,6 +10822,41 @@ declare module 'vscode' {
* without providing an exit code.
*/
readonly code: number | undefined;

/**
* The reason that triggered the exit of a terminal.
*/
readonly reason: TerminalExitReason;
}

/**
* Terminal exit reason kind.
*/
export enum TerminalExitReason {
/**
* Unknown reason.
*/
Unknown = 0,

/**
* The window closed/reloaded.
*/
Shutdown = 1,

/**
* The shell process exited.
*/
Process = 2,

/**
* The user closed the terminal.
*/
User = 3,

/**
* An extension disposed the terminal.
*/
Extension = 4,
}

/**
Expand Down
47 changes: 0 additions & 47 deletions src/vscode-dts/vscode.proposed.terminalExitReason.d.ts

This file was deleted.

0 comments on commit 2313386

Please sign in to comment.