From 121635a5ca9ff97dbe8abbe04d6b1b4d95bcb691 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Thu, 24 Aug 2023 10:26:08 -0700 Subject: [PATCH] Tweak api --- ....proposed.terminalExecuteCommandEvent.d.ts | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts b/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts index 09f5a6212e2..68391fc7293 100644 --- a/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts +++ b/src/vscode-dts/vscode.proposed.terminalExecuteCommandEvent.d.ts @@ -9,10 +9,15 @@ declare module 'vscode' { export interface TerminalExecuteCommandEvent { terminal: Terminal; - command: TerminalCommand; + command: TerminalCommand; } - export interface TerminalCommand { + // NOTE: The generic here is for the future executeCommand function where the result isn't available. + export interface TerminalCommand> { + /** + * The {@link Terminal} the command was executed in. + */ + terminal: Terminal; /** * The full command line that was executed, including both the command and the arguments. */ @@ -25,7 +30,7 @@ declare module 'vscode' { /** * The result of the command. */ - result: Thenable; + result: T; } export interface TerminalExecuteCommandResult { @@ -42,9 +47,14 @@ declare module 'vscode' { export namespace window { /** - * An event that is emitted when a terminal with shell integration activated executes a - * command. + * An event that is emitted when a terminal with shell integration activated has started + * executing a command. */ - export const onWillExecuteTerminalCommand: Event; + export const onWillExecuteTerminalCommand: Event>; + /** + * An event that is emitted when a terminal with shell integration activated has completed + * executing a command. + */ + export const onDidExecuteTerminalCommand: Event; } }