ILock: {
    acquire(): LazyPromise<boolean>;
    acquireBlocking(settings?: AquireBlockingSettings): LazyPromise<boolean>;
    acquireBlockingOrFail(settings?: AquireBlockingSettings): LazyPromise<void>;
    acquireOrFail(): LazyPromise<void>;
    forceRelease(): LazyPromise<void>;
    getOwner(): LazyPromise<string>;
    getRemainingTime(): LazyPromise<null | TimeSpan>;
    isExpired(): LazyPromise<boolean>;
    isLocked(): LazyPromise<boolean>;
    refresh(ttl?: TimeSpan): LazyPromise<boolean>;
    refreshOrFail(ttl?: TimeSpan): LazyPromise<void>;
    release(): LazyPromise<boolean>;
    releaseOrFail(): LazyPromise<void>;
    run<TValue = void>(
        asyncFn: AsyncLazy<TValue>,
    ): LazyPromise<Result<TValue, KeyAlreadyAcquiredLockError>>;
    runBlocking<TValue = void>(
        asyncFn: AsyncLazy<TValue>,
        settings?: AquireBlockingSettings,
    ): LazyPromise<Result<TValue, KeyAlreadyAcquiredLockError>>;
    runBlockingOrFail<TValue = void>(
        asyncFn: AsyncLazy<TValue>,
        settings?: AquireBlockingSettings,
    ): LazyPromise<TValue>;
    runOrFail<TValue = void>(asyncFn: AsyncLazy<TValue>): LazyPromise<TValue>;
}

IMPORT_PATH: "@daiso-tech/core/lock/contracts"

Type declaration