diff --git a/src/object/assign.ts b/src/object/assign.ts index d46f3367..674fcc82 100644 --- a/src/object/assign.ts +++ b/src/object/assign.ts @@ -14,10 +14,10 @@ import { isPlainObject } from 'radashi' * // => { a: 1, b: 2, c: 3, p: { a: 4, b: 5 } } * ``` */ -export function assign>( - initial: X, - override: X, -): X { +export function assign< + X extends Record, + Y extends Record, +>(initial: X, override: Y): X & Y { if (!initial || !override) { return initial ?? override ?? {} }