Use readonly over getter for exposing events

Fixes #4164
This commit is contained in:
Daniel Imms
2022-10-01 07:52:26 -07:00
parent 2659de2291
commit cf9949840b
24 changed files with 78 additions and 81 deletions
+4 -4
View File
@@ -112,13 +112,13 @@ export class SelectionService extends Disposable implements ISelectionService {
private _oldSelectionEnd: [number, number] | undefined = undefined;
private _onLinuxMouseSelection = this.register(new EventEmitter<string>());
public get onLinuxMouseSelection(): IEvent<string> { return this._onLinuxMouseSelection.event; }
public readonly onLinuxMouseSelection = this._onLinuxMouseSelection.event;
private _onRedrawRequest = this.register(new EventEmitter<ISelectionRedrawRequestEvent>());
public get onRequestRedraw(): IEvent<ISelectionRedrawRequestEvent> { return this._onRedrawRequest.event; }
public readonly onRequestRedraw = this._onRedrawRequest.event;
private _onSelectionChange = this.register(new EventEmitter<void>());
public get onSelectionChange(): IEvent<void> { return this._onSelectionChange.event; }
public readonly onSelectionChange = this._onSelectionChange.event;
private _onRequestScrollLines = this.register(new EventEmitter<ISelectionRequestScrollLinesEvent>());
public get onRequestScrollLines(): IEvent<ISelectionRequestScrollLinesEvent> { return this._onRequestScrollLines.event; }
public readonly onRequestScrollLines = this._onRequestScrollLines.event;
constructor(
private readonly _element: HTMLElement,