UNPKG

@xlink-network/xlink-sdk

Version:
8 lines (6 loc) 361 B
type SkipCacheFn<F extends (...args: readonly any[]) => Promise<any>> = (args: Parameters<F>, value: Awaited<ReturnType<F>>) => Promise<boolean>; declare function pMemoize<F extends (...args: readonly any[]) => Promise<any>>(options: { cacheKey: (args: Parameters<F>) => string; skipCache?: boolean | SkipCacheFn<F>; }, fn: F): F; export { pMemoize };