/** * A memoize high order function to cache async function response * * @param func An async function to cache the result of * @param key The provided cache key * @param ttlMs time-to-live in milliseconds for cached data * @returns the cached or latest result */ declare function memoizeAsync(func: (...args: any[]) => Promise, key: string, ttlMs?: number): (...args: any[]) => Promise; /** * A memoize high order function to cache function response * * @param func A function to cache the result of * @param key The provided cache key * @param ttlMs time-to-live in milliseconds for cached data * @returns the cached or latest result */ declare function memoize(func: (...args: any[]) => T, key: string, ttlMs?: number): (...args: any[]) => T; export { memoize, memoizeAsync };