UNPKG

@vreden/meta

Version:

Baileys is a lightweight JavaScript library for interacting with the WhatsApp Web API using WebSocket.

9 lines (7 loc) 258 B
export declare const makeMutex: () => { mutex<T>(code: () => T | Promise<T>): Promise<T> } export type Mutex = ReturnType<typeof makeMutex> export declare const makeKeyedMutex: () => { mutex<T>(key: string, task: () => T | Promise<T>): Promise<T> }