export interface IOptions { ttlMs?: number; } export type Cached = { invalidate: (key: K) => void; }; export declare function withMemoryCache Promise, Key extends string, Return>(originalFunction: Fn, keyGetter: (...args: Parameters) => Key, options?: IOptions): Fn & Cached;