Skip to content

Commit 100f755

Browse files
authored
Merge pull request microsoft#209958 from microsoft/tyriar/145234_read
Rename shellIntegration API readData -> read
2 parents 7c1fa38 + 4046b5f commit 100f755

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/vs/workbench/api/common/extHostTerminalShellIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class InternalTerminalShellExecution {
257257
get cwd(): URI | undefined {
258258
return that.cwd;
259259
},
260-
readData(): AsyncIterable<string> {
260+
read(): AsyncIterable<string> {
261261
return that._createDataStream();
262262
}
263263
};

src/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ declare module 'vscode' {
3535
* @example
3636
* // Log all data written to the terminal for a command
3737
* const command = term.shellIntegration.executeCommand({ commandLine: 'echo "Hello world"' });
38-
* const stream = command.readData();
38+
* const stream = command.read();
3939
* for await (const data of stream) {
4040
* console.log(data);
4141
* }
4242
*/
43-
// TODO: read? "data" typically means Uint8Array. What's the encoding of the string? Usage here will typically be checking for substrings
44-
// TODO: dispose function?
45-
readData(): AsyncIterable<string>;
43+
read(): AsyncIterable<string>;
4644
}
4745

4846
/**

0 commit comments

Comments
 (0)