From 1db7012c9d5d0f7f9feea9a284b0c593166d8996 Mon Sep 17 00:00:00 2001 From: David Nagy Date: Thu, 29 Feb 2024 10:47:25 +0100 Subject: [PATCH] fix(Object): fix return type for _omit and _pick --- src/object/object.util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object/object.util.ts b/src/object/object.util.ts index 1bf5cf15..3f64c3d4 100644 --- a/src/object/object.util.ts +++ b/src/object/object.util.ts @@ -11,7 +11,7 @@ export function _pick( obj: T, props: readonly K[], mutate = false, -): T { +): Pick { if (mutate) { // Start as original object (mutable), DELETE properties that are not whitelisted return Object.keys(obj).reduce((r, prop) => { @@ -34,7 +34,7 @@ export function _omit( obj: T, props: readonly K[], mutate = false, -): T { +): Omit { return props.reduce( (r, prop) => { delete r[prop]