Files
DefinitelyTyped/mem/index.d.ts
Sam Verschueren 29f41655e4 remove namespace
2016-11-26 20:45:21 +01:00

18 lines
478 B
TypeScript

// Type definitions for mem 1.1.0
// 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;