type-fest 3.7.1 → 3.7.2

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": "3.7.1",
3
+ "version": "3.7.2",
4
4
  "description": "A collection of essential TypeScript types",
5
5
  "license": "(MIT OR CC0-1.0)",
6
6
  "repository": "sindresorhus/type-fest",
package/readme.md CHANGED
@@ -270,6 +270,7 @@ Click the type names for complete docs.
270
270
  - `PartialBy` - See [`SetOptional`](https://github.com/sindresorhus/type-fest/blob/main/source/set-optional.d.ts)
271
271
  - `RecordDeep`- See [`Schema`](https://github.com/sindresorhus/type-fest/blob/main/source/schema.d.ts)
272
272
  - `Mutable`- See [`Writable`](https://github.com/sindresorhus/type-fest/blob/main/source/writable.d.ts)
273
+ - `Prettify`- See [`Simplify`](https://github.com/sindresorhus/type-fest/blob/main/source/simplify.d.ts)
273
274
 
274
275
  ## Tips
275
276
 
package/source/merge.d.ts CHANGED
@@ -2,14 +2,10 @@ import type {OmitIndexSignature} from './omit-index-signature';
2
2
  import type {PickIndexSignature} from './pick-index-signature';
3
3
  import type {EnforceOptional} from './enforce-optional';
4
4
 
5
- // Merges two objects without worrying about index signatures or optional keys.
5
+ // Merges two objects without worrying about index signatures.
6
6
  type SimpleMerge<Destination, Source> = {
7
- [Key in keyof Destination | keyof Source]: Key extends keyof Source
8
- ? Source[Key]
9
- : Key extends keyof Destination
10
- ? Destination[Key]
11
- : never;
12
- };
7
+ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key];
8
+ } & Source;
13
9
 
14
10
  /**
15
11
  Merge two types into a new type. Keys of the second type overrides keys of the first type.