UNPKG

@daiso-tech/core

Version:

The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.

19 lines (18 loc) 825 B
/** * @module Lock */ import { type ILockAdapter, type ILockAdapterState } from "../../../../lock/contracts/_module.js"; import { type TimeSpan } from "../../../../time-span/implementations/_module.js"; /** * This `NoOpLockAdapter` will do nothing and is used for easily mocking {@link ILockProvider | `ILockProvider`} for testing. * * IMPORT_PATH: `"@daiso-tech/core/lock/no-op-lock-adapter"` * @group Adapters */ export declare class NoOpLockAdapter implements ILockAdapter { acquire(_key: string, _lockId: string, _ttl: TimeSpan | null): Promise<boolean>; release(_key: string, _lockId: string): Promise<boolean>; forceRelease(_key: string): Promise<boolean>; refresh(_key: string, _lockId: string, _ttl: TimeSpan): Promise<boolean>; getState(_key: string): Promise<ILockAdapterState | null>; }