Skip to content

Commit

Permalink
Fix some compile errors resutling from readonly change
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Jun 12, 2019
1 parent 0284f05 commit b4f6130
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions/grunt/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class TaskDetector {
this.detectors.clear();
}

private updateWorkspaceFolders(added: vscode.WorkspaceFolder[], removed: vscode.WorkspaceFolder[]): void {
private updateWorkspaceFolders(added: readonly vscode.WorkspaceFolder[], removed: readonly vscode.WorkspaceFolder[]): void {
for (let remove of removed) {
let detector = this.detectors.get(remove.uri.toString());
if (detector) {
Expand Down
2 changes: 1 addition & 1 deletion extensions/gulp/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class TaskDetector {
this.detectors.clear();
}

private updateWorkspaceFolders(added: vscode.WorkspaceFolder[], removed: vscode.WorkspaceFolder[]): void {
private updateWorkspaceFolders(added: readonly vscode.WorkspaceFolder[], removed: readonly vscode.WorkspaceFolder[]): void {
for (let remove of removed) {
let detector = this.detectors.get(remove.uri.toString());
if (detector) {
Expand Down
2 changes: 1 addition & 1 deletion extensions/html-language-features/client/src/tagClosing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function activateTagClosing(tagProvider: (document: TextDocument, positio
isEnabled = true;
}

function onDidChangeTextDocument(document: TextDocument, changes: TextDocumentContentChangeEvent[]) {
function onDidChangeTextDocument(document: TextDocument, changes: readonly TextDocumentContentChangeEvent[]) {
if (!isEnabled) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/jake/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class TaskDetector {
this.detectors.clear();
}

private updateWorkspaceFolders(added: vscode.WorkspaceFolder[], removed: vscode.WorkspaceFolder[]): void {
private updateWorkspaceFolders(added: readonly vscode.WorkspaceFolder[], removed: readonly vscode.WorkspaceFolder[]): void {
for (let remove of removed) {
let detector = this.detectors.get(remove.uri.toString());
if (detector) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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}`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ suite('ExtHostDocumentSaveParticipant', () => {
sub.dispose();

assert.ok(event);
assert.throws(() => { event.document = null!; });
assert.throws(() => { (event.document as any) = null!; });
});
});

Expand Down

0 comments on commit b4f6130

Please sign in to comment.