Make FileChangesEvent immutable

This commit is contained in:
Matt Bierner
2019-09-25 18:23:50 -07:00
parent a4ab394ae5
commit af4e34851f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -399,9 +399,9 @@ export interface IFileChange {
export class FileChangesEvent {
private _changes: IFileChange[];
private readonly _changes: readonly IFileChange[];
constructor(changes: IFileChange[]) {
constructor(changes: readonly IFileChange[]) {
this._changes = changes;
}
@@ -1918,7 +1918,7 @@ suite('Disk File Service', function () {
});
}
function hasChange(changes: IFileChange[], type: FileChangeType, resource: URI): boolean {
function hasChange(changes: readonly IFileChange[], type: FileChangeType, resource: URI): boolean {
return changes.some(change => change.type === type && isEqual(change.resource, resource));
}