mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-06 05:38:13 +01:00
Make FileChangesEvent immutable
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user