Open aarongreenwald opened 5 years ago
May be the right way is
declare const memoize : (
limit?: number,
...
or even
export default function memoize(
limit?: number,
equals?: (a: any, b: any) => boolean,
deepObjects?: boolean
) => <T extends Function>(func: T) => T;
Any update on this?
@KhodeN is right on, this type definition is working fine for me:
declare module "lru-memoize" {
function Memoizer(
limit?: number,
equals?: (a: any, b: any) => boolean,
deepObjects?: boolean
): <T extends (...args: any[]) => any>(func: T) => (...funcArgs: Parameters<T>) => ReturnType<T>;
export default Memoizer;
}
Starting today, apparently with the release of v1.1.0, we started getting the following error when running TS compilation on our project that uses lru-memoize:
Our
tsconfig.json
looks like this:Any ideas what we're doing wrong? When I downgrade to version 1.0.2 of lru-memoize everything works.