Fix some compile errors resutling from readonly change

This commit is contained in:
Matt Bierner
2019-06-12 16:54:16 -07:00
parent 0284f052c4
commit b4f6130fe4
7 changed files with 8 additions and 8 deletions

View File

@@ -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}`);
}

View File

@@ -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) {