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];