ILock: ILockListenable & {
    acquire(): LazyPromise<boolean>;
    acquireBlocking(settings?: AquireBlockingSettings): LazyPromise<boolean>;
    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>(asyncFn: LazyPromiseable<TValue>): LazyPromise<Result<TValue, KeyAlreadyAcquiredLockError>>;
    runBlocking<TValue>(asyncFn: LazyPromiseable<TValue>, settings?: AquireBlockingSettings): LazyPromise<Result<TValue, KeyAlreadyAcquiredLockError>>;
    runOrFail<TValue>(asyncFn: LazyPromiseable<TValue>): LazyPromise<TValue>;
}

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

Type declaration