declare module 'mutexify' { type CB = T extends void ? (...args: [NodeJS.ErrnoException] | []) => void : (...args: [NodeJS.ErrnoException] | [null, T]) => void export type Mutexify = ( fn: ( unlock: (cb: CB, ...args: [Error] | [null, T]) => void ) => void ) => void function mutexify(): Mutexify export = mutexify }