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

@@ -21,7 +21,7 @@ declare module 'vscode' {
}
export interface NotebookVariableProvider {
onDidChangeVariables: Event<NotebookDocument>;
readonly onDidChangeVariables: Event<NotebookDocument>;
/** When parent is undefined, this is requesting global Variables. When a variable is passed, it's requesting child props of that Variable. */
provideVariables(notebook: NotebookDocument, parent: Variable | undefined, kind: NotebookVariablesRequestKind, start: number, token: CancellationToken): AsyncIterable<VariablesResult>;