mirror of https://codeberg.org/pzp/pzp-db.git
13 lines
363 B
TypeScript
13 lines
363 B
TypeScript
declare module 'mutexify' {
|
|
type CB<T> = T extends void
|
|
? (...args: [NodeJS.ErrnoException] | []) => void
|
|
: (...args: [NodeJS.ErrnoException] | [null, T]) => void
|
|
export type Mutexify<T> = (
|
|
fn: (
|
|
unlock: (cb: CB<T>, ...args: [Error] | [null, T]) => void
|
|
) => void
|
|
) => void
|
|
function mutexify<T>(): Mutexify<T>
|
|
export = mutexify
|
|
}
|