diff --git a/src/curry.ts b/src/curry.ts index 1d359441..2725ea53 100644 --- a/src/curry.ts +++ b/src/curry.ts @@ -466,8 +466,8 @@ const memoize = ( * is given previously computed values will be checked * for expiration before being returned. */ -export const memo = ( - func: (...args: TArgs) => any, +export const memo = ( + func: (...args: TArgs) => TResult, options: { key?: (...args: TArgs) => string ttl?: number @@ -475,7 +475,7 @@ export const memo = ( ) => { return memoize({}, func, options.key ?? null, options.ttl ?? null) as ( ...args: TArgs - ) => any + ) => TResult } export type DebounceFunction = {