import type { Redis } from 'ioredis'; export declare type UnLockFn = () => Promise; export declare class NotGetLockError extends Error { } export declare const tryLock: (redis: Redis, key: string, px: number) => Promise<[boolean, UnLockFn]>; export declare const runWithMutex: (redis: Redis, key: string, fn: () => Promise, px: number) => Promise; export declare const runWithLockLimit: (redis: Redis, key: string, fn: () => Promise, px: number) => Promise;