UNPKG

347 BTypeScriptView Raw
1export interface TimedCacheOptions {
2 timeout: number;
3 useTimer: boolean;
4 createKey: (args: string[]) => string;
5}
6export declare function timedCache<T extends (...args: string[]) => string>(fn: T, { timeout, useTimer, createKey }: TimedCacheOptions): {
7 get: T;
8 cache: Map<any, any>;
9};
10//# sourceMappingURL=timed-cache.d.ts.map
\No newline at end of file