Skip to content

Commit 082cc53

Browse files
authored
Merge pull request microsoft#186740 from microsoft/tyriar/186737
Remove native private fields from terminal/
2 parents 477558f + 1362a56 commit 082cc53

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

src/vs/workbench/services/terminal/common/embedderTerminalService.ts

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
/* eslint-disable local/code-no-native-private */
7-
86
import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions';
97
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
108
import { Emitter, Event } from 'vs/base/common/event';
@@ -74,44 +72,44 @@ class EmbedderTerminalService implements IEmbedderTerminalService {
7472

7573

7674
class EmbedderTerminalProcess extends Disposable implements ITerminalChildProcess {
77-
readonly #pty: IEmbedderTerminalPty;
75+
private readonly _pty: IEmbedderTerminalPty;
7876

7977
readonly shouldPersist = false;
8078

8179
readonly onProcessData: Event<IProcessDataEvent | string>;
82-
readonly #onProcessReady = this._register(new Emitter<IProcessReadyEvent>());
83-
readonly onProcessReady = this.#onProcessReady.event;
84-
readonly #onDidChangeProperty = this._register(new Emitter<IProcessProperty<any>>());
85-
readonly onDidChangeProperty = this.#onDidChangeProperty.event;
86-
readonly #onProcessExit = this._register(new Emitter<number | undefined>());
87-
readonly onProcessExit = this.#onProcessExit.event;
80+
private readonly _onProcessReady = this._register(new Emitter<IProcessReadyEvent>());
81+
readonly onProcessReady = this._onProcessReady.event;
82+
private readonly _onDidChangeProperty = this._register(new Emitter<IProcessProperty<any>>());
83+
readonly onDidChangeProperty = this._onDidChangeProperty.event;
84+
private readonly _onProcessExit = this._register(new Emitter<number | undefined>());
85+
readonly onProcessExit = this._onProcessExit.event;
8886

8987
constructor(
9088
readonly id: number,
9189
pty: IEmbedderTerminalPty
9290
) {
9391
super();
9492

95-
this.#pty = pty;
96-
this.onProcessData = this.#pty.onDidWrite;
97-
if (this.#pty.onDidClose) {
98-
this._register(this.#pty.onDidClose(e => this.#onProcessExit.fire(e || undefined)));
93+
this._pty = pty;
94+
this.onProcessData = this._pty.onDidWrite;
95+
if (this._pty.onDidClose) {
96+
this._register(this._pty.onDidClose(e => this._onProcessExit.fire(e || undefined)));
9997
}
100-
if (this.#pty.onDidChangeName) {
101-
this._register(this.#pty.onDidChangeName(e => this.#onDidChangeProperty.fire({
98+
if (this._pty.onDidChangeName) {
99+
this._register(this._pty.onDidChangeName(e => this._onDidChangeProperty.fire({
102100
type: ProcessPropertyType.Title,
103101
value: e
104102
})));
105103
}
106104
}
107105

108106
async start(): Promise<ITerminalLaunchError | undefined> {
109-
this.#onProcessReady.fire({ pid: -1, cwd: '', windowsPty: undefined });
110-
this.#pty.open();
107+
this._onProcessReady.fire({ pid: -1, cwd: '', windowsPty: undefined });
108+
this._pty.open();
111109
return undefined;
112110
}
113111
shutdown(): void {
114-
this.#pty.close();
112+
this._pty.close();
115113
}
116114

117115
// TODO: A lot of these aren't useful for some implementations of ITerminalChildProcess, should

0 commit comments

Comments
 (0)