From 18337ceebd78635803d92cc7cc22867db8662b82 Mon Sep 17 00:00:00 2001 From: Ray Epps Date: Thu, 7 Mar 2024 17:24:09 -0700 Subject: [PATCH 1/2] add return type generic to memo func --- src/curry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = { From be43e3a4dd6c9c15fad5074c69aea37409389eed Mon Sep 17 00:00:00 2001 From: Ray Epps Date: Thu, 7 Mar 2024 17:25:44 -0700 Subject: [PATCH 2/2] bump version for deploy --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6aa123b..0f7a54c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "radash", - "version": "12.0.0", + "version": "12.1.0", "description": "Functional utility library - modern, simple, typed, powerful", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.mjs",