Left join a with b.
a
b
This returns the proper type of { ...a, ...b }
{ ...a, ...b }
merge({ a: 1 }, {} as { a?: string | undefined }) // { a: number | string } Copy
merge({ a: 1 }, {} as { a?: string | undefined }) // { a: number | string }
Left join
a
withb
.This returns the proper type of
{ ...a, ...b }