type-fest
Advanced tools
Comparing version 3.7.1 to 3.7.2
{ | ||
"name": "type-fest", | ||
"version": "3.7.1", | ||
"version": "3.7.2", | ||
"description": "A collection of essential TypeScript types", | ||
@@ -5,0 +5,0 @@ "license": "(MIT OR CC0-1.0)", |
@@ -273,2 +273,3 @@ <div align="center"> | ||
- `Mutable`- See [`Writable`](https://github.com/sindresorhus/type-fest/blob/main/source/writable.d.ts) | ||
- `Prettify`- See [`Simplify`](https://github.com/sindresorhus/type-fest/blob/main/source/simplify.d.ts) | ||
@@ -275,0 +276,0 @@ ## Tips |
@@ -5,10 +5,6 @@ import type {OmitIndexSignature} from './omit-index-signature'; | ||
// Merges two objects without worrying about index signatures or optional keys. | ||
// Merges two objects without worrying about index signatures. | ||
type SimpleMerge<Destination, Source> = { | ||
[Key in keyof Destination | keyof Source]: Key extends keyof Source | ||
? Source[Key] | ||
: Key extends keyof Destination | ||
? Destination[Key] | ||
: never; | ||
}; | ||
[Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; | ||
} & Source; | ||
@@ -15,0 +11,0 @@ /** |
256403
915
5983