@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.
18 lines (17 loc) • 759 B
TypeScript
/**
* @module Lock
*/
import type { TimeSpan } from "../../../../utilities/_module-exports.js";
import { type ILockAdapter, type LockRefreshResult } from "../../../../lock/contracts/_module-exports.js";
/**
* This `NoOpLockAdapter` will do nothing and is used for easily mocking {@link ILockProvider | `ILockProvider`} for testing.
*
* IMPORT_PATH: `"@daiso-tech/core/lock/adapters"`
* @group Adapters
*/
export declare class NoOpLockAdapter implements ILockAdapter {
acquire(_key: string, _owner: string, _ttl: TimeSpan | null): Promise<boolean>;
release(_key: string, _owner: string): Promise<boolean>;
forceRelease(_key: string): Promise<boolean>;
refresh(_key: string, _owner: string, _ttl: TimeSpan): Promise<LockRefreshResult>;
}