/** * function that acquires a lock by name and runs a callback. */ export type LockFunction = (name: string, fn: () => Promise) => Promise;