UNPKG

promise-singleflight

Version:

provide a wrap async function for singleflight

2 lines (1 loc) 172 B
export declare function createPromiseSingleflight<Key extends string | number | symbol, ReturnValue>(): (key: Key, fn: () => Promise<ReturnValue>) => Promise<ReturnValue>;