/** * take a read lock that will be released when the function has finished running * @param func * @param timeout time in ms to wait to get the lock. Null mean infinite. */ export declare const readLockAsync: <T>(func: () => Promise<T>, timeout?: number | null) => Promise<T>; /** * Take a write lock that will be released when the function has finished running * @param func * @param timeout time in ms to wait to get the lock. Null mean infinite. */ export declare const writeLockAsync: <T>(func: () => Promise<T>, timeout?: number | null) => Promise<T>;