Skip to content

Commit 65c6384

Browse files
committed
fix: use private property for timer assignment
1 parent 46fac0f commit 65c6384

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/common/src/attachments/AttachmentQueue.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { AttachmentErrorHandler } from './AttachmentErrorHandler.js';
2121
*/
2222
export class AttachmentQueue {
2323
/** Timer for periodic synchronization operations */
24-
readonly periodicSyncTimer?: ReturnType<typeof setInterval>;
24+
#periodicSyncTimer?: ReturnType<typeof setInterval>;
2525

2626
/** Context for managing attachment records in the database */
2727
readonly context: AttachmentContext;
@@ -158,7 +158,7 @@ export class AttachmentQueue {
158158
await this.verifyAttachments();
159159

160160
// Sync storage periodically
161-
this.periodicSyncTimer = setInterval(async () => {
161+
this.#periodicSyncTimer = setInterval(async () => {
162162
await this.syncStorage();
163163
}, this.syncIntervalMs);
164164

@@ -271,8 +271,8 @@ export class AttachmentQueue {
271271
* Clears the periodic sync timer and closes all active attachment watchers.
272272
*/
273273
async stopSync(): Promise<void> {
274-
clearInterval(this.periodicSyncTimer);
275-
this.periodicSyncTimer = undefined;
274+
clearInterval(this.#periodicSyncTimer);
275+
this.#periodicSyncTimer = undefined;
276276
if (this.watchActiveAttachments) await this.watchActiveAttachments.close();
277277
if (this.watchAttachmentsAbortController) {
278278
this.watchAttachmentsAbortController.abort();

0 commit comments

Comments
 (0)