type-fest 5.4.0 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "type-fest",
3
- "version": "5.4.0",
3
+ "version": "5.4.1",
4
4
  "description": "A collection of essential TypeScript types",
5
5
  "license": "(MIT OR CC0-1.0)",
6
6
  "repository": "sindresorhus/type-fest",
@@ -33,7 +33,7 @@ type MergeDeepRecordProperty<
33
33
  Source,
34
34
  Options extends MergeDeepInternalOptions,
35
35
  > = undefined extends Source
36
- ? MergeDeepOrReturn<Source, Exclude<Destination, undefined>, Exclude<Source, undefined>, Options> | undefined
36
+ ? MergeDeepOrReturn<Source, Exclude<Destination, undefined>, Exclude<Source, undefined>, Options> | (undefined extends Destination ? undefined : never)
37
37
  : MergeDeepOrReturn<Source, Destination, Source, Options>;
38
38
 
39
39
  /**
@@ -58,7 +58,7 @@ type DoMergeDeepRecord<
58
58
  }
59
59
  // Case in rule 3: Both the source and the destination contain the key.
60
60
  & {
61
- [Key in keyof Source as Key extends keyof Destination ? Key : never]: MergeDeepRecordProperty<Destination[Key], Source[Key], Options>;
61
+ [Key in keyof Source as Key extends keyof Destination ? Key : never]: MergeDeepRecordProperty<Required<Destination>[Key], Required<Source>[Key], Options>;
62
62
  };
63
63
 
64
64
  /**