Skip to content

Commit

Permalink
fix(types): correct type inference where merged types are same (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 9, 2020
1 parent 694c26e commit f322607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Expand Up @@ -31,7 +31,7 @@ type MergeArrays<Destination, Source> = Destination extends Array<infer Destinat
type MergeObjects<
Destination extends Input,
Defaults extends Input
> = Omit<Destination, keyof Destination & keyof Defaults> & Omit<Defaults, keyof Destination & keyof Defaults> &
> = Destination extends Defaults ? Destination : Omit<Destination, keyof Destination & keyof Defaults> & Omit<Defaults, keyof Destination & keyof Defaults> &
{
-readonly [Key in keyof Destination & keyof Defaults]:
Destination[Key] extends null
Expand Down

0 comments on commit f322607

Please sign in to comment.