diff --git a/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts b/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts index bd6b71abe510..cf9b53d6dea2 100644 --- a/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts +++ b/src/vs/workbench/api/common/extHostTerminalShellIntegration.ts @@ -257,7 +257,7 @@ class InternalTerminalShellExecution { get cwd(): URI | undefined { return that.cwd; }, - readData(): AsyncIterable { + read(): AsyncIterable { return that._createDataStream(); } }; diff --git a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts index be2310eb230d..7e58c746cad8 100644 --- a/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +++ b/src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts @@ -35,14 +35,12 @@ declare module 'vscode' { * @example * // Log all data written to the terminal for a command * const command = term.shellIntegration.executeCommand({ commandLine: 'echo "Hello world"' }); - * const stream = command.readData(); + * const stream = command.read(); * for await (const data of stream) { * console.log(data); * } */ - // TODO: read? "data" typically means Uint8Array. What's the encoding of the string? Usage here will typically be checking for substrings - // TODO: dispose function? - readData(): AsyncIterable; + read(): AsyncIterable; } /**