export default function withLock(dir: string, fn: () => Promise, opts: { stale: number; locks: string; }): Promise;