type Func = (...args: any[]) => any; export interface Cache { create: CacheCreateFunc } interface CacheCreateFunc { (): { get(key: K): V; set(key: K, value: V): void; has(key: K): boolean; } } export type Serializer = (args: any[]) => string; export interface Options { cache?: Cache>; serializer?: Serializer; strategy?: MemoizeFunc; } export interface MemoizeFunc { (fn: F, options?: Options): F; } interface Memoize extends MemoizeFunc { strategies: { variadic: MemoizeFunc; monadic: MemoizeFunc; }; } declare const memoize: Memoize; export default memoize;