From ead1b89c67e9bbd351a583cfc2e8c90e98934d4b Mon Sep 17 00:00:00 2001 From: Wesley Finck Date: Tue, 28 Oct 2025 11:45:03 -0700 Subject: [PATCH] update type errors for in mem lock service --- src/shared/infrastructure/locking/InMemoryLockService.ts | 4 ++-- src/shared/infrastructure/locking/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/infrastructure/locking/InMemoryLockService.ts b/src/shared/infrastructure/locking/InMemoryLockService.ts index 9954ea5c..63c3c92e 100644 --- a/src/shared/infrastructure/locking/InMemoryLockService.ts +++ b/src/shared/infrastructure/locking/InMemoryLockService.ts @@ -22,7 +22,7 @@ export class InMemoryLockService implements ILockService { } createRequestLock(): RuntimeLock { - return async (key: string, fn: () => Promise) => { + return async (key: string, fn: () => any) => { const lockKey = `oauth:lock:${key}`; const now = Date.now(); const expiresAt = now + 45000; // 45 seconds @@ -36,7 +36,7 @@ export class InMemoryLockService implements ILockService { } catch { // Ignore errors from other processes } - await new Promise(resolve => setTimeout(resolve, 100)); + await new Promise((resolve) => setTimeout(resolve, 100)); return this.createRequestLock()(key, fn); } diff --git a/src/shared/infrastructure/locking/index.ts b/src/shared/infrastructure/locking/index.ts index d2e9ef39..a857bcba 100644 --- a/src/shared/infrastructure/locking/index.ts +++ b/src/shared/infrastructure/locking/index.ts @@ -1,4 +1,4 @@ -export { ILockService } from './ILockService'; +export type { ILockService } from './ILockService'; export { RedisLockService } from './RedisLockService'; export { InMemoryLockService } from './InMemoryLockService'; export { LockServiceFactory } from './LockServiceFactory'; -- 2.51.2