From 4d77d6035f97ae7a74e14b6af3cf3364ce17ce15 Mon Sep 17 00:00:00 2001 From: James P Date: Fri, 19 Apr 2024 12:10:03 -0500 Subject: [PATCH] Fixed assignWithDefaults type --- src/objects.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects.ts b/src/objects.ts index fa945cb..d28c94c 100644 --- a/src/objects.ts +++ b/src/objects.ts @@ -13,7 +13,7 @@ export function omit(object: T, ...keys: re return filterObject>(object, (key: K) => !keys.flat().includes(key)); } -export function assignWithDefaults>(to: To, from: From, defaults: Partial = to): void { +export function assignWithDefaults(to: To, from: From, defaults: Partial = to): void { const keys = new Set([...Object.keys(to), ...Object.keys(from)]); for (const key of keys) { to[key] = from[key] ?? defaults[key] ?? to[key];