Files
DefinitelyTyped/types/mem/index.d.ts
2017-03-24 14:27:52 -07:00

18 lines
476 B
TypeScript

// Type definitions for mem 1.1
// Project: https://github.com/sindresorhus/mem
// Definitions by: Sam Verschueren <https://github.com/SamVerschueren>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Options {
maxAge?: number;
cacheKey?: (...args: any[]) => string;
cache?: any;
}
declare const mem: {
<F extends (...args: any[]) => any>(fn: F, options?: Options): F;
clear<F extends (...args: any[]) => any>(fn: F): void;
};
export = mem;