mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-05 21:07:16 +01:00
Merge pull request #209958 from microsoft/tyriar/145234_read
Rename shellIntegration API readData -> read
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user