Merge pull request #209958 from microsoft/tyriar/145234_read

Rename shellIntegration API readData -> read
This commit is contained in:
Daniel Imms
2024-04-09 08:45:55 -07:00
committed by GitHub
2 changed files with 3 additions and 5 deletions
@@ -257,7 +257,7 @@ class InternalTerminalShellExecution {
get cwd(): URI | undefined {
return that.cwd;
},
readData(): AsyncIterable<string> {
read(): AsyncIterable<string> {
return that._createDataStream();
}
};
@@ -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<string>;
read(): AsyncIterable<string>;
}
/**