Mark most Event properties as readonly

We want to prevent mistaken changes that do something like this:

```ts
foo.onEvent = () => { ... };
```

When they almost always mean:

```ts
foo.onEvent(() => { ... })
```
This commit is contained in:
Matt Bierner
2025-10-09 13:59:00 -07:00
parent efdc6b1042
commit 245265d15e
148 changed files with 402 additions and 403 deletions

View File

@@ -178,7 +178,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
public readonly id: string;
private _foldingRanges: FoldingRegions | null = null;
private _onDidFoldingStateChanged = new Emitter<void>();
onDidFoldingStateChanged: Event<void> = this._onDidFoldingStateChanged.event;
readonly onDidFoldingStateChanged: Event<void> = this._onDidFoldingStateChanged.event;
private _hiddenRanges: ICellRange[] = [];
private _focused: boolean = true;