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';