Typeplugin-kysely-postgresv0.3.0
Merge
Merge two types into a new type. Keys of the second type overrides keys of the first type.
This is different from the TypeScript & (intersection) operator. With &, conflicting property types are intersected, which often results in never. For example, {a: string} & {a: number} makes a become string & number, which resolves to never. With Merge, the second type's keys cleanly override the first, so Merge<{a: string}, {a: number}> gives {a: number} as expected. Merge also produces a flattened type (via Simplify), making it more readable in IDE tooltips compared to A & B.
See also:ObjectMerge Object
Destination
DestinationSource
Source