diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 04788f62ec1..c625aad7a66 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -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; } diff --git a/src/vs/platform/files/test/node/diskFileService.test.ts b/src/vs/platform/files/test/node/diskFileService.test.ts index 238ccd8ede7..3f5c57ec1a8 100644 --- a/src/vs/platform/files/test/node/diskFileService.test.ts +++ b/src/vs/platform/files/test/node/diskFileService.test.ts @@ -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)); }