Marking most private emitters as readonly

Emitters should generally not be reassigned as their corresponding event would also be lost. Marking these as readonly just to enforce this
This commit is contained in:
Matt Bierner
2019-09-23 17:31:18 -07:00
parent e8b2096646
commit 029009eafd
68 changed files with 179 additions and 179 deletions

View File

@@ -308,10 +308,10 @@ export class MainThreadDocumentsAndEditors {
private readonly _proxy: ExtHostDocumentsAndEditorsShape;
private readonly _textEditors = new Map<string, MainThreadTextEditor>();
private _onTextEditorAdd = new Emitter<MainThreadTextEditor[]>();
private _onTextEditorRemove = new Emitter<string[]>();
private _onDocumentAdd = new Emitter<ITextModel[]>();
private _onDocumentRemove = new Emitter<URI[]>();
private readonly _onTextEditorAdd = new Emitter<MainThreadTextEditor[]>();
private readonly _onTextEditorRemove = new Emitter<string[]>();
private readonly _onDocumentAdd = new Emitter<ITextModel[]>();
private readonly _onDocumentRemove = new Emitter<URI[]>();
readonly onTextEditorAdd: Event<MainThreadTextEditor[]> = this._onTextEditorAdd.event;
readonly onTextEditorRemove: Event<string[]> = this._onTextEditorRemove.event;