export type CtxFunction = F & { fn: F mfn: F reset: () => void unCache: () => void } export type MemoizeOptions = { once?: boolean eq?: (prevArgs: any[], nextArgs: []) => boolean cache?: Map skipEqualThis?: boolean } export function withCtx(fn: T, opts?: MemoizeOptions): CtxFunction export function robust(fn: T, opts?: MemoizeOptions): CtxFunction export default function memoize(fn: T, opts?: MemoizeOptions): T