UNPKG

machinomy

Version:

Micropayments powered by Ethereum

8 lines (7 loc) 242 B
export declare type Task<T> = () => Promise<T>; export default class Mutex { private static DEFAULT_QUEUE; private queues; synchronize<T>(task: Task<T>): Promise<T>; synchronizeOn<T>(key: string, task: Task<T>): Promise<T>; }