mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-21 18:59:15 +00:00
Fix some compile errors resutling from readonly change
This commit is contained in:
@@ -75,7 +75,7 @@ class BufferSynchronizer {
|
||||
}
|
||||
}
|
||||
|
||||
public change(filepath: string, events: vscode.TextDocumentContentChangeEvent[]) {
|
||||
public change(filepath: string, events: readonly vscode.TextDocumentContentChangeEvent[]) {
|
||||
if (!events.length) {
|
||||
return;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ class SyncedBuffer {
|
||||
this.state = BufferState.Closed;
|
||||
}
|
||||
|
||||
public onContentChanged(events: vscode.TextDocumentContentChangeEvent[]): void {
|
||||
public onContentChanged(events: readonly vscode.TextDocumentContentChangeEvent[]): void {
|
||||
if (this.state !== BufferState.Open) {
|
||||
console.error(`Unexpected buffer state: ${this.state}`);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class TagClosing extends Disposable {
|
||||
|
||||
private onDidChangeTextDocument(
|
||||
document: vscode.TextDocument,
|
||||
changes: vscode.TextDocumentContentChangeEvent[]
|
||||
changes: readonly vscode.TextDocumentContentChangeEvent[]
|
||||
) {
|
||||
const activeDocument = vscode.window.activeTextEditor && vscode.window.activeTextEditor.document;
|
||||
if (document !== activeDocument || changes.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user